Skip to content

Commit

Permalink
Merge pull request #35 from firehawk89/add-404-page
Browse files Browse the repository at this point in the history
Add 404 Page
  • Loading branch information
firehawk89 authored Feb 13, 2024
2 parents 297e42f + 16ebc15 commit 252ca1a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// TODO: Add 404 page

import type { Metadata } from 'next'

import Footer from '@/components/footer'
Expand Down
30 changes: 30 additions & 0 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { buttonVariants } from '@/components/ui/button'
import Content from '@/components/ui/content'
import Heading from '@/components/ui/heading'
import { LINK } from '@/types/enums/Link'
import { cn } from '@/utils'
import Image from 'next/image'
import Link from 'next/link'

export default function NotFound() {
return (
<div className="relative h-full bg-ghost pt-header dark:bg-dark">
<Image
alt="Background"
className="-z-5 object-cover object-center"
fill
sizes="100vw"
src="/hero-bg.svg"
/>
<Content className="relative flex h-full flex-col items-center justify-center gap-3 text-center md:gap-5">
<Heading>Page Not Found</Heading>
<p className="text-lg md:text-xl">
The page you were looking for does not exists.
</p>
<Link className={cn(buttonVariants())} href={LINK.index}>
Return Home
</Link>
</Content>
</div>
)
}
2 changes: 1 addition & 1 deletion src/components/sections/hero/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Hero: FC<HeroProps> = ({ className, ...props }) => {
src="/hero-bg.svg"
/>
<Content
className="z-5 relative flex flex-col items-center justify-center text-center"
className="relative flex flex-col items-center justify-center text-center"
size="tight"
>
<article>
Expand Down

0 comments on commit 252ca1a

Please sign in to comment.