diff --git a/src/components/pages/AccountsPage.tsx b/src/components/pages/AccountsPage.tsx
index 5e9c049..ae99ddd 100644
--- a/src/components/pages/AccountsPage.tsx
+++ b/src/components/pages/AccountsPage.tsx
@@ -10,7 +10,6 @@ import { formatMoney } from './ChartPage'
export function AccountsPage() {
const { data, refetch } = trpc.institutions.useQuery()
- console.log({ PlaidLinkButton })
return (
diff --git a/src/router.tsx b/src/router.tsx
index 686d7ba..3b72117 100644
--- a/src/router.tsx
+++ b/src/router.tsx
@@ -11,6 +11,9 @@ import { Page } from './lib/types'
import { AccountsPage } from './components/pages/AccountsPage'
import { SettingsPage } from './components/pages/SettingsPage'
+const LastRouteKey = 'lastRoute' as const
+const lastRoute = localStorage.getItem(LastRouteKey)
+
export const router = createMemoryRouter(
createRoutesFromElements(
}>
@@ -21,4 +24,11 @@ export const router = createMemoryRouter(
} />
,
),
+ {
+ initialEntries: lastRoute ? [lastRoute] : undefined,
+ },
)
+
+router.subscribe((route) => {
+ localStorage.setItem(LastRouteKey, route.location.pathname)
+})