Skip to content

Commit

Permalink
Merge pull request #318 from chitraa-cj/404page
Browse files Browse the repository at this point in the history
404 not found page customized
  • Loading branch information
subhadeeproy3902 authored Jun 18, 2024
2 parents 9a8e0e3 + b1454e8 commit 3c49054
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 3c49054

Please sign in to comment.