feat: support navigating to primary pages via URL query parameter
Allow users to open a specific primary page by visiting /?page=explore, /?page=settings, etc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
71dc0bb4fc
commit
2b97adfdca
1 changed files with 4 additions and 0 deletions
|
|
@ -139,6 +139,10 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
|
||||||
navigatePrimaryPage('relay', { url })
|
navigatePrimaryPage('relay', { url })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const page = searchParams.get('page')
|
||||||
|
if (page && page in PRIMARY_PAGE_MAP) {
|
||||||
|
navigatePrimaryPage(page as TPrimaryPageName)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onPopState = (e: PopStateEvent) => {
|
const onPopState = (e: PopStateEvent) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue