Skip to content

Commit d82dad4

Browse files
authored
fix(qwik-nx): get canonical url from the right path (#138)
1 parent a065e19 commit d82dad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/qwik-nx/src/generators/application/files/src/components/router-head/router-head.tsx__template__

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { useDocumentHead, useLocation } from '@builder.io/qwik-city';
66
*/
77
export const RouterHead = component$(() => {
88
const head = useDocumentHead();
9-
const loc = useLocation();
9+
const { url } = useLocation();
1010

1111
return (
1212
<>
1313
<title>{head.title}</title>
1414

15-
<link rel="canonical" href={loc.href} />
15+
<link rel="canonical" href={url.href} />
1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1717
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
1818

0 commit comments

Comments
 (0)