e.stopPropagation()}>
diff --git a/web/src/components/Navigation.tsx b/web/src/components/Navigation.tsx
index 572e2613..df24b057 100644
--- a/web/src/components/Navigation.tsx
+++ b/web/src/components/Navigation.tsx
@@ -1,3 +1,4 @@
+import { Tooltip } from "@mui/joy";
import classNames from "classnames";
import { useEffect } from "react";
import { NavLink } from "react-router-dom";
@@ -16,10 +17,12 @@ interface NavLinkItem {
}
interface Props {
+ collapsed?: boolean;
className?: string;
}
const Navigation = (props: Props) => {
+ const { collapsed, className } = props;
const t = useTranslate();
const user = useCurrentUser();
const inboxStore = useInboxStore();
@@ -45,31 +48,31 @@ const Navigation = (props: Props) => {
id: "header-home",
path: "/",
title: t("common.home"),
- icon:
,
+ icon:
,
};
const timelineNavLink: NavLinkItem = {
id: "header-timeline",
path: "/timeline",
title: t("timeline.title"),
- icon:
,
+ icon:
,
};
const resourcesNavLink: NavLinkItem = {
id: "header-resources",
path: "/resources",
title: t("common.resources"),
- icon:
,
+ icon:
,
};
const exploreNavLink: NavLinkItem = {
id: "header-explore",
path: "/explore",
title: t("common.explore"),
- icon:
,
+ icon:
,
};
const profileNavLink: NavLinkItem = {
id: "header-profile",
path: user ? `/u/${encodeURIComponent(user.username)}` : "",
title: t("common.profile"),
- icon:
,
+ icon:
,
};
const inboxNavLink: NavLinkItem = {
id: "header-inbox",
@@ -78,7 +81,7 @@ const Navigation = (props: Props) => {
icon: (
<>
>
@@ -88,25 +91,25 @@ const Navigation = (props: Props) => {
id: "header-archived",
path: "/archived",
title: t("common.archived"),
- icon:
,
+ icon:
,
};
const settingNavLink: NavLinkItem = {
id: "header-setting",
path: "/setting",
title: t("common.settings"),
- icon:
,
+ icon:
,
};
const signInNavLink: NavLinkItem = {
id: "header-auth",
path: "/auth",
title: t("common.sign-in"),
- icon:
,
+ icon:
,
};
const aboutNavLink: NavLinkItem = {
id: "header-about",
path: "/about",
title: t("common.about"),
- icon:
,
+ icon:
,
};
const navLinks: NavLinkItem[] = user
@@ -117,16 +120,17 @@ const Navigation = (props: Props) => {
);
};
diff --git a/web/src/layouts/Root.tsx b/web/src/layouts/Root.tsx
index 6a17bcd0..399d5270 100644
--- a/web/src/layouts/Root.tsx
+++ b/web/src/layouts/Root.tsx
@@ -1,18 +1,32 @@
+import classNames from "classnames";
import { Suspense } from "react";
import { Outlet } from "react-router-dom";
+import useLocalStorage from "react-use/lib/useLocalStorage";
import Navigation from "@/components/Navigation";
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
import Loading from "@/pages/Loading";
function Root() {
const { sm } = useResponsiveWidth();
+ const [collapsed, setCollapsed] = useLocalStorage