Skip to content

Commit 86a84a9

Browse files
committed
Use buildLogoutUrl in Navigation component
Replace the static URL with buildLogoutUrl in the navigation links. TS-2779
1 parent af5b7a1 commit 86a84a9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

apps/cyberstorm-remix/app/commonComponents/Navigation/Navigation.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ import {
3535
import { faDiscord, faGithub } from "@fortawesome/free-brands-svg-icons";
3636

3737
import { classnames } from "@thunderstore/cyberstorm/src/utils/utils";
38-
import { buildAuthLoginUrl } from "cyberstorm/utils/ThunderstoreAuth";
38+
import {
39+
buildAuthLoginUrl,
40+
buildLogoutUrl,
41+
} from "cyberstorm/utils/ThunderstoreAuth";
3942
import { faArrowUpRight } from "@fortawesome/pro-solid-svg-icons";
4043
import { getPublicEnvVariables } from "cyberstorm/security/publicEnvVariables";
4144

@@ -404,7 +407,7 @@ export function DesktopUserDropdown(props: {
404407
<NewDropDownItem asChild>
405408
<NewLink
406409
primitiveType="link"
407-
href={`${domain}/logout/`}
410+
href={buildLogoutUrl(domain)}
408411
rootClasses="dropdown__item navigation-header__dropdown-item"
409412
>
410413
<NewIcon csMode="inline" noWrapper csVariant="tertiary">
@@ -566,7 +569,7 @@ export function MobileUserPopoverContent(props: {
566569
</NewLink>
567570
<NewLink
568571
primitiveType="link"
569-
href={domain ? `${domain}/logout/` : "/logout"}
572+
href={buildLogoutUrl(domain)}
570573
rootClasses="mobile-navigation__popover-item mobile-navigation__popover--thick"
571574
>
572575
<NewIcon csMode="inline" noWrapper>

0 commit comments

Comments
 (0)