generated from iqbalpa/nextjs-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use client'; | ||
|
||
import { CircleArrowLeft } from 'lucide-react'; | ||
import { useRouter } from 'next/navigation'; | ||
import React from 'react'; | ||
|
||
const BackButton: React.FC = () => { | ||
const router = useRouter(); | ||
const handleBack = () => router.push('/'); | ||
|
||
return ( | ||
<button | ||
onClick={handleBack} | ||
className="absolute left-5 top-20 z-40 flex flex-row gap-2 rounded-full bg-slate-600 bg-opacity-80 px-5 py-3 text-white duration-100 hover:scale-105 hover:cursor-pointer hover:bg-slate-500 hover:bg-opacity-95" | ||
> | ||
<CircleArrowLeft /> | ||
<p>Back</p> | ||
</button> | ||
); | ||
}; | ||
|
||
export default BackButton; |