fix: give Explore its own /explore route so PiP navigates back to voice correctly
The Explore page shared /channels/@me with Friends, differentiated by a showExplore UI flag. When PiP navigated to a voice channel, the stale flag caused MainContent to render text chat instead of the voice grid. Replace the flag with a dedicated /explore route so the URL is the single source of truth.
This commit is contained in:
@@ -183,14 +183,15 @@ export function AppLayout() {
|
||||
// Handle route params
|
||||
useEffect(() => {
|
||||
if (serverId === '@me') {
|
||||
if (!useUIStore.getState().showExplore) {
|
||||
setShowDms(true);
|
||||
}
|
||||
setShowDms(true);
|
||||
setCurrentServer(null);
|
||||
} else if (serverId) {
|
||||
setShowDms(false);
|
||||
setCurrentServer(serverId);
|
||||
loadServerDetail(serverId);
|
||||
} else {
|
||||
setShowDms(false);
|
||||
setCurrentServer(null);
|
||||
}
|
||||
}, [serverId, setCurrentServer, loadServerDetail, setShowDms]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user