{
userStore.fetchInboxes();
}, []);
- const homeNavLink: NavLinkItem = {
- id: "header-home",
- path: Routes.ROOT,
- title: t("common.home"),
- icon:
,
- };
const resourcesNavLink: NavLinkItem = {
id: "header-resources",
path: Routes.RESOURCES,
title: t("common.resources"),
icon:
,
};
- const exploreNavLink: NavLinkItem = {
- id: "header-explore",
- path: Routes.EXPLORE,
- title: t("common.explore"),
- icon:
,
- };
- const profileNavLink: NavLinkItem = {
- id: "header-profile",
- path: user ? `/u/${encodeURIComponent(user.username)}` : "",
- title: t("common.profile"),
- icon:
,
- };
const inboxNavLink: NavLinkItem = {
id: "header-inbox",
path: Routes.INBOX,
@@ -86,12 +68,6 @@ const Navigation = observer((props: Props) => {
title: t("common.settings"),
icon:
,
};
- const signInNavLink: NavLinkItem = {
- id: "header-auth",
- path: Routes.AUTH,
- title: t("common.sign-in"),
- icon:
,
- };
const aboutNavLink: NavLinkItem = {
id: "header-about",
path: Routes.ABOUT,
@@ -99,16 +75,14 @@ const Navigation = observer((props: Props) => {
icon:
,
};
- const navLinks: NavLinkItem[] = user
- ? [homeNavLink, resourcesNavLink, exploreNavLink, profileNavLink, inboxNavLink, archivedNavLink, settingNavLink]
- : [exploreNavLink, signInNavLink, aboutNavLink];
+ const navLinks: NavLinkItem[] = user ? [resourcesNavLink, inboxNavLink, archivedNavLink, settingNavLink] : [aboutNavLink];
return (
-
+
{navLinks.map((navLink) => (
diff --git a/web/src/components/NavigationDrawer.tsx b/web/src/components/NavigationDrawer.tsx
index 596d414a..46104c15 100644
--- a/web/src/components/NavigationDrawer.tsx
+++ b/web/src/components/NavigationDrawer.tsx
@@ -27,7 +27,7 @@ const NavigationDrawer = () => {
-
+
diff --git a/web/src/components/SearchBar.tsx b/web/src/components/SearchBar.tsx
index a3fdb806..504f8bb0 100644
--- a/web/src/components/SearchBar.tsx
+++ b/web/src/components/SearchBar.tsx
@@ -31,15 +31,15 @@ const SearchBar = () => {
return (
-
+
-
+
);
};
diff --git a/web/src/components/StatisticsView.tsx b/web/src/components/StatisticsView.tsx
index 11fef056..1e22ce52 100644
--- a/web/src/components/StatisticsView.tsx
+++ b/web/src/components/StatisticsView.tsx
@@ -60,7 +60,7 @@ const StatisticsView = () => {
showMonthYearPicker
showFullMonthYearPicker
customInput={
-
+
{dayjs(visibleMonthString).toDate().toLocaleString(i18n.language, { year: "numeric", month: "long" })}
}
diff --git a/web/src/components/UserBanner.tsx b/web/src/components/UserBanner.tsx
index c6a992e4..b8c127cb 100644
--- a/web/src/components/UserBanner.tsx
+++ b/web/src/components/UserBanner.tsx
@@ -1,5 +1,5 @@
import { Dropdown, Menu, MenuButton, MenuItem } from "@mui/joy";
-import { LogOutIcon, SmileIcon } from "lucide-react";
+import { LogOutIcon, SmileIcon, User2Icon } from "lucide-react";
import { authServiceClient } from "@/grpcweb";
import useCurrentUser from "@/hooks/useCurrentUser";
import useNavigateTo from "@/hooks/useNavigateTo";
@@ -17,10 +17,10 @@ const UserBanner = (props: Props) => {
const { collapsed } = props;
const t = useTranslate();
const navigateTo = useNavigateTo();
- const user = useCurrentUser();
+ const currentUser = useCurrentUser();
const workspaceGeneralSetting = workspaceStore.state.generalSetting;
- const title = (user ? user.nickname || user.username : workspaceGeneralSetting.customProfile?.title) || "Memos";
- const avatarUrl = (user ? user.avatarUrl : workspaceGeneralSetting.customProfile?.logoUrl) || "/full-logo.webp";
+ const title = (currentUser ? currentUser.nickname || currentUser.username : workspaceGeneralSetting.customProfile?.title) || "Memos";
+ const avatarUrl = (currentUser ? currentUser.avatarUrl : workspaceGeneralSetting.customProfile?.logoUrl) || "/full-logo.webp";
const handleSignOut = async () => {
await authServiceClient.signOut({});
@@ -30,10 +30,10 @@ const UserBanner = (props: Props) => {
return (
-
+
@@ -42,6 +42,10 @@ const UserBanner = (props: Props) => {
)}
diff --git a/web/src/pages/UserProfile.tsx b/web/src/pages/UserProfile.tsx
index a845758e..3269a6ff 100644
--- a/web/src/pages/UserProfile.tsx
+++ b/web/src/pages/UserProfile.tsx
@@ -7,7 +7,6 @@ import { toast } from "react-hot-toast";
import { useParams } from "react-router-dom";
import MemoFilters from "@/components/MemoFilters";
import MemoView from "@/components/MemoView";
-import MobileHeader from "@/components/MobileHeader";
import PagedMemoList from "@/components/PagedMemoList";
import UserAvatar from "@/components/UserAvatar";
import useLoading from "@/hooks/useLoading";
@@ -77,8 +76,7 @@ const UserProfile = () => {
};
return (
-
-
+
{!loadingState.isLoading &&
(user ? (