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:
@@ -28,7 +28,6 @@ interface UIState {
|
||||
modalData: Record<string, unknown>;
|
||||
isMobile: boolean;
|
||||
showDms: boolean;
|
||||
showExplore: boolean;
|
||||
imagePreviewUrl: string | null;
|
||||
userProfilePopout: {
|
||||
user: User | null;
|
||||
@@ -41,7 +40,6 @@ interface UIState {
|
||||
closeModal: () => void;
|
||||
setIsMobile: (isMobile: boolean) => void;
|
||||
setShowDms: (show: boolean) => void;
|
||||
setShowExplore: (show: boolean) => void;
|
||||
openImagePreview: (url: string) => void;
|
||||
closeImagePreview: () => void;
|
||||
openUserProfile: (user: User, position: { top: number; left: number }) => void;
|
||||
@@ -66,7 +64,6 @@ export const useUIStore = create<UIState>()(
|
||||
modalData: {},
|
||||
isMobile: false,
|
||||
showDms: false,
|
||||
showExplore: false,
|
||||
imagePreviewUrl: null,
|
||||
userProfilePopout: {
|
||||
user: null,
|
||||
@@ -92,8 +89,7 @@ export const useUIStore = create<UIState>()(
|
||||
}
|
||||
},
|
||||
|
||||
setShowDms: (show) => set({ showDms: show, ...(show ? { showExplore: false } : {}) }),
|
||||
setShowExplore: (show) => set({ showExplore: show, ...(show ? { showDms: false } : {}) }),
|
||||
setShowDms: (show) => set({ showDms: show }),
|
||||
|
||||
openImagePreview: (url) => set({ activeModal: 'imagePreview', imagePreviewUrl: url }),
|
||||
closeImagePreview: () => set({ activeModal: null, imagePreviewUrl: null }),
|
||||
|
||||
Reference in New Issue
Block a user