File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
gui/src/components/BackButton Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ import CustomImage from '@/components/ImageComponents/CustomImage' ;
2+ import imagePath from '@/app/imagePath' ;
3+ import { useRouter } from 'next/navigation' ;
4+
5+ interface BackButtonProps {
6+ id : string ;
7+ url : string ;
8+ }
9+
10+ export default function BackButton ( { id, url } : BackButtonProps ) {
11+ const router = useRouter ( ) ;
12+
13+ return (
14+ < div
15+ id = { `${ id } _page_back_button` }
16+ className = {
17+ 'flex w-fit cursor-pointer flex-row items-center justify-center gap-1'
18+ }
19+ onClick = { ( ) => router . push ( url ) }
20+ >
21+ < CustomImage
22+ className = { 'size-4' }
23+ src = { imagePath . backArrow }
24+ alt = { 'back_button' }
25+ />
26+ < span className = { 'secondary_color proxima_nova text-sm font-normal' } >
27+ Back
28+ </ span >
29+ </ div >
30+ ) ;
31+ }
You can’t perform that action at this time.
0 commit comments