fix: chat nav highlight
This commit is contained in:
@@ -40,7 +40,8 @@ export default function HomePage() {
|
|||||||
if (loading || !ready) {
|
if (loading || !ready) {
|
||||||
return <Loading reload={true} fullscreen={true} />;
|
return <Loading reload={true} fullscreen={true} />;
|
||||||
}
|
}
|
||||||
const isSettingPage = pathname.startsWith("/setting");
|
const isSettingPage = isHomePath || pathname.startsWith("/setting");
|
||||||
|
const isChattingPage = pathname.startsWith("/chat");
|
||||||
if (isSettingPage) {
|
if (isSettingPage) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -62,8 +63,8 @@ export default function HomePage() {
|
|||||||
<User uid={loginUid} />
|
<User uid={loginUid} />
|
||||||
<nav className="link_navs">
|
<nav className="link_navs">
|
||||||
<NavLink
|
<NavLink
|
||||||
className={({ isActive }) => {
|
className={() => {
|
||||||
return `link ${isHomePath || isActive ? "active" : ""}`;
|
return `link ${isChattingPage ? "active" : ""}`;
|
||||||
}}
|
}}
|
||||||
to={chatNav}
|
to={chatNav}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user