Skip to content

Commit

Permalink
Merge pull request #7 from andostronaut/develop
Browse files Browse the repository at this point in the history
feat: add not found component handler
  • Loading branch information
andostronaut authored Jul 12, 2024
2 parents bf13c10 + df2cce0 commit 42864ea
Showing 1 changed file with 30 additions and 0 deletions.
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 @@
'use client'

import { useRouter } from 'next/navigation'

import { Button } from '@/components/ui/button'

export default function NotFound() {
const router = useRouter()

return (
<div style={{ height: '50vh' }}>
<div className="w-full flex flex-col items-center justify-center h-full">
<div className="text-center space-y-4">
<h1 className="text-4xl font-bold tracking-tight">
404 - Page Not Found
</h1>
<p className="text-gray-500 dark:text-gray-400">
The page you re looking for doesn t exist or has been moved.
</p>
<Button
className="inline-flex h-9 items-center justify-center rounded-md bg-gray-900 px-4 py-2 text-sm font-medium text-gray-50 shadow transition-colors hover:bg-gray-900/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-950 disabled:pointer-events-none disabled:opacity-50 dark:bg-gray-50 dark:text-gray-900 dark:hover:bg-gray-50/90 dark:focus-visible:ring-gray-300"
onClick={() => router.back()}
>
Go back
</Button>
</div>
</div>
</div>
)
}

0 comments on commit 42864ea

Please sign in to comment.