Skip to content

Commit

Permalink
fix: use router instead of a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraglol authored Feb 8, 2022
1 parent eefac78 commit d554049
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import Image from "next/image";
import { FC } from "react";

inport { useRouter } from "next/router"

const customError: FC = () => {

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

<a
href="/"
<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
</a>
</button>
</div>
);
};
Expand Down

0 comments on commit d554049

Please sign in to comment.