Skip to content

Commit

Permalink
fix: build and use link
Browse files Browse the repository at this point in the history
  • Loading branch information
avneesh0612 committed Feb 8, 2022
1 parent 3ea1146 commit e8fc196
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import Image from "next/image";
import Link from "next/link";
import { FC } from "react";

import { useRouter } from "next/router"

const customError: FC = () => {

const router = useRouter()
const CustomError: FC = () => {
return (
<div className="flex flex-col items-center justify-center w-screen h-screen">
<Image
Expand All @@ -24,14 +21,13 @@ const customError: FC = () => {
We suggest you back to home :)
</p>

<button
onClick={()=>router.push('/')}
className="mt-4 cursor-pointer flex items-center px-5 py-2 duration-100 border-2 rounded-lg fill-current stroke-current text-darkerblue bg-neongreen border-neongreen hover:bg-transparent hover:text-neongreen"
>
Back to Home
</button>
<Link href="/">
<a className="mt-4 cursor-pointer flex items-center px-5 py-2 duration-100 border-2 rounded-lg fill-current stroke-current text-darkerblue bg-neongreen border-neongreen hover:bg-transparent hover:text-neongreen">
Back to Home
</a>
</Link>
</div>
);
};

export default customError;
export default CustomError;

0 comments on commit e8fc196

Please sign in to comment.