Skip to content

Commit

Permalink
fix: check client side for redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
skinmaker1345 committed Oct 26, 2024
1 parent 60f8f08 commit 47a8ca2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/developers/applications/bots/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const BotApplication: NextPage<BotApplicationProps> = ({ user, spec, bot, theme,
return res
}

if (!user) {
if (!user && typeof window !== 'undefined') {
localStorage.redirectTo = window.location.href
redirectTo(router, 'login')
return
Expand Down
2 changes: 1 addition & 1 deletion pages/developers/applications/servers/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const ServerApplication: NextPage<ServerApplicationProps> = ({
return res
}

if (!user) {
if (!user && typeof window !== 'undefined') {
localStorage.redirectTo = window.location.href
redirectTo(router, 'login')
return
Expand Down

0 comments on commit 47a8ca2

Please sign in to comment.