mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 01:06:23 +02:00
refactor: fixed forefox rendering issues
- Updated NewChatPage to reset state when switching between chats and search spaces. - Enhanced LayoutDataProvider to reset transient slide-out panels on search space changes. - Refactored RightPanel to simplify rendering logic and remove unnecessary animations. - Cleaned up LayoutShell by removing motion components for improved performance.
This commit is contained in:
parent
d960a065b1
commit
042b42a8a0
5 changed files with 55 additions and 86 deletions
|
|
@ -262,6 +262,15 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid
|
|||
}
|
||||
}, [pendingNewChat, params?.chat_id, router, searchSpaceId, resetCurrentThread]);
|
||||
|
||||
// Reset transient slide-out panels when switching search spaces.
|
||||
// Some browsers can retain overlay/backdrop state across route transitions.
|
||||
useEffect(() => {
|
||||
setIsInboxSidebarOpen(false);
|
||||
setIsAllSharedChatsSidebarOpen(false);
|
||||
setIsAllPrivateChatsSidebarOpen(false);
|
||||
setIsAnnouncementsSidebarOpen(false);
|
||||
}, [searchSpaceId]);
|
||||
|
||||
const searchSpaces: SearchSpace[] = useMemo(() => {
|
||||
if (!searchSpacesData || !Array.isArray(searchSpacesData)) return [];
|
||||
return searchSpacesData.map((space) => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue