mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 07:57:15 +00:00
fix(webui): resolve team ID using target location pathname in beforeLoad
This commit is contained in:
@@ -127,9 +127,9 @@ interface MyRouterContext {
|
||||
}
|
||||
|
||||
export const Route = createRootRouteWithContext<MyRouterContext>()({
|
||||
beforeLoad: async () => {
|
||||
beforeLoad: async ({ location }) => {
|
||||
if (typeof window !== 'undefined') {
|
||||
const pathname = window.location.pathname
|
||||
const pathname = location.pathname
|
||||
const teamId = await resolveTeamIdFromPath(pathname)
|
||||
|
||||
if (teamId) {
|
||||
|
||||
Reference in New Issue
Block a user