Skip to content

Commit

Permalink
App: use Link
Browse files Browse the repository at this point in the history
  • Loading branch information
robisim74 committed Nov 14, 2022
1 parent 2e9bdd5 commit abfea90
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/components/header/header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { component$, useStyles$ } from '@builder.io/qwik';
import { useLocation } from '@builder.io/qwik-city';
import { Link, useLocation } from '@builder.io/qwik-city';
import { $translate as t, useSpeakConfig, useSpeakLocale } from 'qwik-speak';

import { ChangeLocale } from './change-locale';
Expand All @@ -21,17 +21,17 @@ export const Header = component$(() => {
<header>
<div class="header-inner">
<section class="logo">
<a href="/">Qwik Speak ⚡️</a>
<Link href="/">Qwik Speak ⚡️</Link>
</section>
<nav>
<a href={getHref('/')}
<Link href={getHref('/')}
class={{ active: pathname.endsWith('/') || config.supportedLocales.some(x => pathname.endsWith(x.lang)) }}>
{t('app.nav.home')}
</a>
<a href={getHref('/page')}
</Link>
<Link href={getHref('/page')}
class={{ active: pathname.endsWith('/page') }}>
{t('app.nav.page')}
</a>
</Link>
</nav>
<ChangeLocale />
</div>
Expand Down

0 comments on commit abfea90

Please sign in to comment.