Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

allow nested routes for last visited route in logs (#33775)

Jordi Enric7eeab4ebb35c
diff --git a/apps/studio/components/layouts/LogsLayout/LogsLayout.tsx b/apps/studio/components/layouts/LogsLayout/LogsLayout.tsx
index fe549556727..3a0d3769c6e 100644
--- a/apps/studio/components/layouts/LogsLayout/LogsLayout.tsx
+++ b/apps/studio/components/layouts/LogsLayout/LogsLayout.tsx
@@ -23,12 +23,12 @@ const LogsLayout = ({ title, children }: PropsWithChildren<LogsLayoutProps>) =>
const router = useRouter()
const [_, setLastLogsPage] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.LAST_VISITED_LOGS_PAGE,
- router.pathname.split('/').pop()
+ router.pathname.split('/logs/')[1]
)
useEffect(() => {
if (router.pathname.includes('/logs/')) {
- const path = router.pathname.split('/').pop()
+ const path = router.pathname.split('/logs/')[1]
setLastLogsPage(path)
}
}, [router, setLastLogsPage])