fix: channel icon and chat icon active

This commit is contained in:
zerosoul
2022-06-13 21:12:07 +08:00
parent 87994f0a9c
commit ec0f4240b0
2 changed files with 11 additions and 3 deletions
+6 -1
View File
@@ -61,7 +61,12 @@ export default function HomePage() {
<div className={`col left`}>
<User uid={loginUid} />
<nav className="link_navs">
<NavLink className={`link ${isHomePath ? "active" : ""}`} to={chatNav}>
<NavLink
className={({ isActive }) => {
return `link ${isHomePath || isActive ? "active" : ""}`;
}}
to={chatNav}
>
<Tooltip tip="Chat">
<ChatIcon />
</Tooltip>