mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 18:10:39 +09: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:
parent
b05ac91aa7
commit
cf4b338cd4
2 changed files with 61 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue