File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
react-kit/src/lib/components/buttons Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { IconButton , Tooltip } from '@mui/material' ;
33import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' ;
4- import { useNavigate } from 'react-router-dom' ;
4+ import { NavigateFunction } from 'react-router-dom' ;
55
66interface GoBackButtonProps {
77 name ?: string ;
88 children ?: React . ReactNode ;
9+ navigate : NavigateFunction ;
910}
1011
1112export function GoBackButton ( props : GoBackButtonProps ) {
12- const navigate = useNavigate ( ) ;
1313 return (
1414 < Tooltip title = "Go Back to Previous Page" >
15- < IconButton name = { props . name } color = "primary" onClick = { ( ) => navigate ( - 1 ) } >
15+ < IconButton name = { props . name } color = "primary" onClick = { ( ) => props . navigate ( - 1 ) } >
1616 < ArrowBackIosIcon />
1717 { props . children }
1818 </ IconButton >
You can’t perform that action at this time.
0 commit comments