Skip to content

Commit

Permalink
404 not found page customized
Browse files Browse the repository at this point in the history
  • Loading branch information
chitraa-cj committed Jun 17, 2024
1 parent 74ff582 commit b1454e8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Binary file added public/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Image from 'next/image';

const Custom404 = () => {
const router = useRouter();

return (
<div className="flex flex-col justify-center items-center h-screen dark:bg-black relative">
<div className="relative w-1/2 max-w-md mx-auto">
<Image
src="/404.png"
alt="Background Image"
width={500}
height={500}
className="object-contain"
/>
</div>
<button
onClick={() => router.push('/')}
className="mt-6 px-6 py-2 bg-orange-600 text-white rounded hover:bg-orange-700"
>
Go Back to Home Page
</button>
</div>
);
};

export default Custom404;

0 comments on commit b1454e8

Please sign in to comment.