fix: stick mobile footer nav to bottom
This commit is contained in:
@@ -27,7 +27,10 @@ function navIsActive(
|
||||
case "browseAll":
|
||||
return pathname === "/browse" && !sp.has("sort");
|
||||
case "categories":
|
||||
return pathname === "/" && hash === "#categories";
|
||||
return (
|
||||
pathname === "/categories" ||
|
||||
(pathname === "/" && hash === "#categories")
|
||||
);
|
||||
case "browseLatest":
|
||||
return pathname === "/" && hash === "#latest";
|
||||
case "browseRecommended":
|
||||
@@ -387,7 +390,7 @@ export function PublicLayout() {
|
||||
{t("all")}
|
||||
</Link>
|
||||
<Link
|
||||
to="/#categories"
|
||||
to="/categories"
|
||||
className={navClassName(na("categories"))}
|
||||
aria-current={na("categories") ? "page" : undefined}
|
||||
>
|
||||
@@ -479,7 +482,7 @@ export function PublicLayout() {
|
||||
{t("all")}
|
||||
</Link>
|
||||
<Link
|
||||
to="/#categories"
|
||||
to="/categories"
|
||||
className={navClassName(na("categories"))}
|
||||
aria-current={na("categories") ? "page" : undefined}
|
||||
onClick={() => setOpen(false)}
|
||||
@@ -570,10 +573,10 @@ export function PublicLayout() {
|
||||
active={pathname === "/favorites"}
|
||||
/>
|
||||
<BottomNavIcon
|
||||
to="/#latest"
|
||||
label={t("latest")}
|
||||
to="/#popular"
|
||||
label={t("popular")}
|
||||
icon="update"
|
||||
active={pathname === "/" && hash === "#latest"}
|
||||
active={pathname === "/" && hash === "#popular"}
|
||||
/>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user