mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-30 05:16:50 +01:00
feat(ui): remember last visited page per company on company switch
When switching companies via the sidebar rail, dropdown, or keyboard shortcuts, the app now navigates to the last page visited for that company instead of staying on the current (now irrelevant) page. Falls back to /dashboard if no previous page exists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
b05ac91aa7
commit
cf4b338cd4
2 files changed
+61
No files matched your search
@@ -19,6 +19,7 @@ import { usePanel } from "../context/PanelContext";
|
||||
import { useCompany } from "../context/CompanyContext";
|
||||
import { useSidebar } from "../context/SidebarContext";
|
||||
import { useKeyboardShortcuts } from "../hooks/useKeyboardShortcuts";
|
||||
import { useCompanyPageMemory } from "../hooks/useCompanyPageMemory";
|
||||
import { healthApi } from "../api/health";
|
||||
import { queryKeys } from "../lib/queryKeys";
|
||||
import { cn } from "../lib/utils";
|
||||
@@ -58,6 +59,8 @@ export function Layout() {
|
||||
[companies, setSelectedCompanyId],
|
||||
);
|
||||
|
||||
useCompanyPageMemory();
|
||||
|
||||
useKeyboardShortcuts({
|
||||
onNewIssue: () => openNewIssue(),
|
||||
onToggleSidebar: toggleSidebar,
|
||||
|
||||
Reference in new issue
Block a user