File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import React , { Fragment } from 'react'
2- import { useHistory } from 'react-router-dom'
2+ import { useNavigate } from 'react-router-dom'
33
44export const About : React . FC = ( ) => {
5- const history = useHistory ( )
5+ const navigate = useNavigate ( )
66
77 return (
88 < Fragment >
@@ -17,7 +17,7 @@ export const About: React.FC = () => {
1717 type = "button"
1818 className = "btn"
1919 cy-data = "go-back-button"
20- onClick = { ( ) => history . push ( '/' ) }
20+ onClick = { ( ) => navigate ( '/' ) }
2121 >
2222 Go back
2323 </ button >
Original file line number Diff line number Diff line change 11import React , { Fragment } from 'react'
2- import { useHistory } from 'react-router-dom'
2+ import { useNavigate } from 'react-router-dom'
33
44export const About : React . FC = ( ) => {
5- const history = useHistory ( )
5+ const navigate = useNavigate ( )
66
77 return (
88 < Fragment >
@@ -13,7 +13,7 @@ export const About: React.FC = () => {
1313 omnis doloremque itaque eius eaque sint facilis unde tenetur reiciendis
1414 aliquam soluta?
1515 </ p >
16- < button type = "button" className = "btn" onClick = { ( ) => history . push ( '/' ) } >
16+ < button type = "button" className = "btn" onClick = { ( ) => navigate ( '/' ) } >
1717 Go back
1818 </ button >
1919 </ Fragment >
You can’t perform that action at this time.
0 commit comments