Skip to content

Commit 64b5b74

Browse files
authored
chore(storefront): Fix build errors with using as (#1471)
1 parent 4f96d58 commit 64b5b74

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

apps/storefront/layouts/NotFoundLayout/NotFoundLayout.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@ const NotFoundLayout = ({ content, data }: NotFoundLayoutProps) => {
3232
<h1 className={classes.title}>{data.title}</h1>
3333
<p className={classes.desc}>{data.description}</p>
3434
<Link
35-
as={NextLink}
3635
className={classes.link}
37-
href='/'
38-
prefetch={false}
36+
asChild
3937
>
40-
Gå til forsiden
38+
<NextLink
39+
href='/'
40+
prefetch={false}
41+
>
42+
Gå til forsiden
43+
</NextLink>
4144
</Link>
4245
</div>
4346
{content}

apps/storefront/layouts/PageLayout/PageLayout.tsx

+11-8
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,19 @@ const PageLayout = ({ content, data }: PageLayoutProps) => {
3030
<Container>
3131
<div className={classes.headerContent}>
3232
<Link
33-
as={NextLink}
34-
href={'/' + data.backUrl}
33+
asChild
3534
className={classes.backBtn}
36-
prefetch={false}
3735
>
38-
<ArrowLeftIcon
39-
title='Tilbake'
40-
fontSize={28}
41-
/>
42-
{data.backText}
36+
<NextLink
37+
href={'/' + data.backUrl}
38+
prefetch={false}
39+
>
40+
<ArrowLeftIcon
41+
title='Tilbake'
42+
fontSize={28}
43+
/>
44+
{data.backText}
45+
</NextLink>
4346
</Link>
4447
<div className={classes.meta}>
4548
<span>

0 commit comments

Comments
 (0)