Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
frontend: fix navigation links by using absolute URLs
Browse files Browse the repository at this point in the history
Looks like relative links are somewhat broken
  • Loading branch information
sandhose committed May 3, 2024
1 parent 8e513ea commit 21d04a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion frontend/src/routes/_account.sessions.$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function NotFound(): React.ReactElement {
title={t("frontend.session_detail.alert.title", { deviceId: id })}
>
{t("frontend.session_detail.alert.text")}
<Link from={Route.fullPath} to=".." search={{ first: 6 }}>
<Link to="/sessions" search={{ first: 6 }}>
{t("frontend.session_detail.alert.button")}
</Link>
</Alert>
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/routes/_account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,8 @@ function Account(): React.ReactElement {
<UnverifiedEmailAlert user={session.user} />

<NavBar>
<NavItem from={Route.fullPath} to=".">
{t("frontend.nav.settings")}
</NavItem>
<NavItem from={Route.fullPath} to="./sessions">
{t("frontend.nav.devices")}
</NavItem>
<NavItem to="/">{t("frontend.nav.settings")}</NavItem>
<NavItem to="/sessions">{t("frontend.nav.devices")}</NavItem>
</NavBar>
</div>

Expand Down
7 changes: 1 addition & 6 deletions frontend/src/routes/reset-cross-signing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,7 @@ function ResetCrossSigning(): React.ReactNode {
)}

{!deepLink && (
<ButtonLink
to=".."
from={Route.fullPath}
kind="tertiary"
Icon={IconArrowLeft}
>
<ButtonLink to="/" kind="tertiary" Icon={IconArrowLeft}>
{t("action.back")}
</ButtonLink>
)}
Expand Down

0 comments on commit 21d04a6

Please sign in to comment.