You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we're solving this in a "hacky" way so we don't have to do it in each component separately:
<SpacesProviderclient={spaces}><SpaceProvidername="my-space"><EnterSpaceuser={user}>{children}</EnterSpace></SpaceProvider></SpacesProvider>...constEnterSpace=({ children, user })=>{const{ space }=useSpace();const[spaceEntered,setSpaceEntered]=useState(false);useEffect(()=>{constenterSpace=async()=>{awaitspace.enter(user);setSpaceEntered(true);};constleaveSpace=async()=>{awaitspace.leave();};if(space){enterSpace();}return()=>{if(space){leaveSpace();}};},[space,user]);if(!spaceEntered){return<LoadingIndicator/>}return<>{children}</>;};
Or is there something we're missing?
The text was updated successfully, but these errors were encountered:
Would it be possible to optionally enter spaces automatically? Personally, I see more use cases where I immediately want to enter a space than not.
Suggestion:
Right now we're solving this in a "hacky" way so we don't have to do it in each component separately:
Or is there something we're missing?
The text was updated successfully, but these errors were encountered: