fix
This commit is contained in:
@@ -171,8 +171,8 @@ class SocketProvider extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SocketContext.Provider value={{socket:this.socket,socketB:this.socketB}}>
|
<SocketContext.Provider value={{socket:this.socket,socketB:this.socketB}}>
|
||||||
{/* Always render children but control visibility */}
|
{/* Always render children but control visibility style={{ display: this.state.connected ? 'block' : 'none' }}*/}
|
||||||
<div style={{ display: this.state.connected ? 'block' : 'none' }}>
|
<div>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -185,8 +185,8 @@ class SocketProvider extends Component {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Show default fallback when not connected and no prerendered content */}
|
{/* Show default fallback when not connected and no prerendered content {!this.state.connected && !showPrerenderFallback && this.props.fallback} */}
|
||||||
{!this.state.connected && !showPrerenderFallback && this.props.fallback}
|
|
||||||
</SocketContext.Provider>
|
</SocketContext.Provider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user