Add a condition to change tab
This commit is contained in:
@@ -74,8 +74,10 @@ export default function Navigasyon({selectedTab}) {
|
|||||||
const handleChange = (event, newValue) => {
|
const handleChange = (event, newValue) => {
|
||||||
setValue(newValue)
|
setValue(newValue)
|
||||||
|
|
||||||
|
if (newValue !== selectedTab) {
|
||||||
router.push(tabRouteHref[newValue], tabRouteAs[newValue])
|
router.push(tabRouteHref[newValue], tabRouteAs[newValue])
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
|
|||||||
Reference in New Issue
Block a user