fix: swap window undef check

This commit is contained in:
TrèsAbhi committed 2024-06-15 14:05:47 -05:00
1 parent e966c8df16
commit 4d462508bc
1 file changed
+3 -3
+3 -3
View File
@@ -217,11 +217,11 @@ export default function Navbar() {
<Dialog.Close key={region}>
<Link
href={
typeof window === undefined
? undefined
: `https://api.worldoftanks.${region}/wot/auth/login/?application_id=${WARGAMING_APPLICATION_ID}&redirect_uri=${encodeURIComponent(
typeof window !== undefined
? `https://api.worldoftanks.${region}/wot/auth/login/?application_id=${WARGAMING_APPLICATION_ID}&redirect_uri=${encodeURIComponent(
`${location.origin}/auth/wargaming?return=${location.origin}${location.pathname}`,
)}`
: undefined
}
>
<Button color="red">