Skip to content

Commit

Permalink
feat(error): add custom 404-page
Browse files Browse the repository at this point in the history
  • Loading branch information
SelmaBergstrand committed Oct 16, 2024
1 parent 83e8b3b commit ffc47dc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
24 changes: 24 additions & 0 deletions tavla/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Button } from '@entur/button'
import { Heading3 } from '@entur/typography'
import Link from 'next/link'
import Image from 'next/image'
import BeaverIllustration from 'assets/illustrations/Beaver.png'

function Custom404() {
return (
<div className="mx-auto h-[70vh] lg:w-1/4 flex flex-col justify-center items-center gap-5">
<Heading3>Denne siden finnes ikke!</Heading3>
<Image
src={BeaverIllustration}
className="w-1/2"
alt="Illustrasjon av en bever"
/>

<Button as={Link} href="/" variant="primary">
Tilbake til forsiden
</Button>
</div>
)
}

export default Custom404
26 changes: 18 additions & 8 deletions tavla/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import { Header } from 'components/Header'
import { Button } from '@entur/button'
import { Heading3 } from '@entur/typography'
import Link from 'next/link'
import Image from 'next/image'
import BeaverIllustration from 'assets/illustrations/Beaver.png'

function NotFoundPage() {
function Custom404() {
return (
<div className="root">
<div className="rootContainer">
<Header />
<p className="pl-8">Tavlen kunne ikke hentes!</p>
</div>
<div className="mx-auto h-[70vh] lg:w-1/4 flex flex-col justify-center items-center gap-5">
<Heading3>Denne siden finnes ikke!</Heading3>
<Image
src={BeaverIllustration}
className="w-1/2"
alt="Illustrasjon av en bever"
/>

<Button as={Link} href="/" variant="primary">
Tilbake til forsiden
</Button>
</div>
)
}

export default NotFoundPage
export default Custom404

0 comments on commit ffc47dc

Please sign in to comment.