Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 404 Page #35

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading