Add a condition to change tab

This commit is contained in:
2020-12-16 00:14:43 +01:00
parent 6cf85536d5
commit 05d5e12307
+3 -1
View File
@@ -74,7 +74,9 @@ export default function Navigasyon({selectedTab}) {
const handleChange = (event, newValue) => {
setValue(newValue)
router.push(tabRouteHref[newValue], tabRouteAs[newValue])
if (newValue !== selectedTab) {
router.push(tabRouteHref[newValue], tabRouteAs[newValue])
}
}
return (