Skip to content

Commit

Permalink
refactor: correct all links
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebus-84 committed Feb 5, 2024
1 parent d63deb4 commit c2dcbf1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/lib/components/molecules/ScanButton.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script lang="ts">
import { qrCode } from 'ionicons/icons';
import { r } from '$lib/i18n';
import { qrCode } from 'ionicons/icons';
</script>

<ion-fab-button href="/scan">
<ion-fab-button href={r("/scan")}>
<ion-icon icon={qrCode} translucent />
</ion-fab-button>

Expand Down
4 changes: 2 additions & 2 deletions src/lib/ionic/backButton.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { goto } from '$lib/i18n'
import { goto, r } from '$lib/i18n'
export let href: string;
</script>

<ion-back-button default-href={href} on:click={() => goto(href)} />
<ion-back-button default-href={r(href)} on:click={() => goto(href)} />
3 changes: 2 additions & 1 deletion src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script>
import { page } from '$app/stores';
import {r} from '$lib/i18n'
</script>

<h1>{$page.status}: {$page.error?.message}</h1>
<ion-button href="/">Go to home</ion-button>
<ion-button href={r("/")}>Go to home</ion-button>
5 changes: 3 additions & 2 deletions src/routes/[[lang]]/(auth)/login/(methods)/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import BackButton from '$lib/ionic/backButton.svelte';
import { r } from '$lib/i18n';
import BackButton from '$lib/ionic/backButton.svelte';
// @ts-ignore
import IonPage from 'ionic-svelte/components/IonPage.svelte';
</script>
Expand All @@ -8,7 +9,7 @@
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<BackButton href="/login" />
<BackButton href={r("/login")} />
</ion-buttons>
</ion-toolbar>
</ion-header>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { regenerateKeypair } from '$lib/keypairoom';
import { goto } from '$lib/i18n';
import { goto, r } from '$lib/i18n';
import { z } from 'zod';
import { createForm, FieldController, Form, FormError } from '$lib/forms';
import { setKeypairPreference } from '$lib/preferences/keypair.js';
Expand Down Expand Up @@ -63,7 +63,7 @@

<div>
<ion-text color="secondary">
<a href="/login/questions" class="text-sm">Login with your personal questions? Tap here</a>
<a href={r("/login/questions")} class="text-sm">Login with your personal questions? Tap here</a>
</ion-text>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import CopyButton from '$lib/components/copyButton.svelte';
import { setKeypairPreference } from '$lib/preferences/keypair.js';
import { unlockApp } from '$lib/preferences/locked.js';
import { r } from '$lib/i18n';
//
Expand Down Expand Up @@ -111,7 +112,7 @@

<div>
<ion-text color="secondary">
<a href="/login/passphrase" class="text-sm">Login with your passphrase? Tap here</a>
<a href={r("/login/passphrase")} class="text-sm">Login with your passphrase? Tap here</a>
</ion-text>
</div>
</div>
Expand All @@ -136,6 +137,6 @@
</div>
</div>

<ion-button href="/wallet" expand="full">Go to wallet</ion-button>
<ion-button href={r("/wallet")} expand="full">Go to wallet</ion-button>
</div>
{/if}

0 comments on commit c2dcbf1

Please sign in to comment.