wrong cat bug

This commit is contained in:
VividTruthKeeper 2023-02-25 01:42:17 +05:00
parent 6d4426744f
commit 7b2b78c438
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,8 @@ const SubNav = () => {
onClickLink(0);
return;
}
const category = location.pathname[location.pathname.length - 1];
const category =
location.pathname.split("/")[location.pathname.split("/").length - 1];
onClickLink(parseInt(category));
}, [location]);