Skip to content

Commit

Permalink
feat(frontend): Oisy logo redirects to Home Page (#2442)
Browse files Browse the repository at this point in the history
# Motivation

We wrap the Oisy Logo into a button that redirects to the Home Page.

# Tests

Local replica worked as expected.
  • Loading branch information
AntonioVentilii-DFINITY authored Sep 22, 2024
1 parent 47496b5 commit d6f9c9f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/frontend/src/lib/components/hero/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import OisyWalletLogo from '$lib/components/icons/OisyWalletLogo.svelte';
import { authNotSignedIn, authSignedIn } from '$lib/derived/auth.derived';
import { modalAboutHow, modalAboutWhat } from '$lib/derived/modal.derived';
import { i18n } from '$lib/stores/i18n.store';
import { replaceOisyPlaceholders } from '$lib/utils/i18n.utils';
export let back = false;
</script>
Expand All @@ -22,9 +24,13 @@
{#if back}
<Back />
{:else}
<div class="flex p-4 items-center">
<a
href="/"
class="flex p-4 items-center gap-0 pointer-events-auto no-underline"
aria-label={replaceOisyPlaceholders($i18n.core.alt.go_to_home)}
>
<OisyWalletLogo />
</div>
</a>
{/if}

<div
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
},
"alt": {
"logo": "$name logo",
"background": "Background image of $oisy_name with gradient logo"
"background": "Background image of $oisy_name with gradient logo",
"go_to_home": "Go to the $oisy_name home page"
}
},
"navigation": {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/lib/types/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface I18nCore {
more: string;
};
info: { test_banner: string };
alt: { logo: string; background: string };
alt: { logo: string; background: string; go_to_home: string };
}

interface I18nNavigation {
Expand Down

0 comments on commit d6f9c9f

Please sign in to comment.