mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
fix: check client side for redirects
This commit is contained in:
parent
60f8f08707
commit
47a8ca20cf
@ -52,7 +52,7 @@ const BotApplication: NextPage<BotApplicationProps> = ({ user, spec, bot, theme,
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user) {
|
if (!user && typeof window !== 'undefined') {
|
||||||
localStorage.redirectTo = window.location.href
|
localStorage.redirectTo = window.location.href
|
||||||
redirectTo(router, 'login')
|
redirectTo(router, 'login')
|
||||||
return
|
return
|
||||||
|
|||||||
@ -57,7 +57,7 @@ const ServerApplication: NextPage<ServerApplicationProps> = ({
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user) {
|
if (!user && typeof window !== 'undefined') {
|
||||||
localStorage.redirectTo = window.location.href
|
localStorage.redirectTo = window.location.href
|
||||||
redirectTo(router, 'login')
|
redirectTo(router, 'login')
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user