fix(auth): make things work
This commit is contained in:
+3
-1
@@ -23,7 +23,9 @@ export function serverClient() {
|
||||
if (error.code === "UNAUTHORIZED") {
|
||||
const lang = ctx?.lang || Lang.en
|
||||
const pathname = ctx?.pathname || "/"
|
||||
redirect(`/${lang}/login?redirectTo=${encodeURIComponent(pathname)}`)
|
||||
redirect(
|
||||
`/${lang}/login?redirectTo=${encodeURIComponent(`/${lang}/${pathname}`)}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user