404 added

This commit is contained in:
parsa aghaei 2024-09-30 12:36:38 +03:30
parent 3e75cef667
commit 08fe8466ed
6 changed files with 21 additions and 0 deletions

BIN
public/images/404/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
public/images/404/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

BIN
public/images/404/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

BIN
public/images/404/4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
public/images/404/5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

21
src/app/not-found.tsx Normal file
View File

@ -0,0 +1,21 @@
import Image from "next/image";
import Link from "next/link";
export default function NotFound() {
const imageUrl = `/images/404/${Math.floor(Math.random() * 5) + 1}.jpg`;
console.log(imageUrl);
return (
<div className="mt-[120px] flex flex-col items-center justify-center gap-3">
<Image src={imageUrl} width={500} height={500} alt="404 illustration" />
<h2 className="text-[30px] font-[800]">Not Found</h2>
<p className="font-[600]">Could not find requested resource</p>
<Link
href="/"
className="rounded-md border border-[#fd6f00] px-5 py-3 font-[500] text-[#fd6f00]"
>
Return Home
</Link>
</div>
);
}