From 1fdb8b7b01c6c4a59609cc01107f3327f60ab9f9 Mon Sep 17 00:00:00 2001 From: Wen Sun Date: Tue, 16 Jan 2024 10:04:03 +0900 Subject: [PATCH] fix: apply customized profile name in mobile header (#2723) Fix mobile header title, apply customized profile name --- web/src/components/MobileHeader.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/components/MobileHeader.tsx b/web/src/components/MobileHeader.tsx index 849ecd91b..824453055 100644 --- a/web/src/components/MobileHeader.tsx +++ b/web/src/components/MobileHeader.tsx @@ -2,6 +2,7 @@ import classNames from "classnames"; import { useState } from "react"; import useWindowScroll from "react-use/lib/useWindowScroll"; import useResponsiveWidth from "@/hooks/useResponsiveWidth"; +import { useGlobalStore } from "@/store/module"; import NavigationDrawer from "./NavigationDrawer"; interface Props { @@ -10,6 +11,8 @@ interface Props { } const MobileHeader = (props: Props) => { + const globalStore = useGlobalStore(); + const { systemStatus } = globalStore.state; const { className, children } = props; const { sm } = useResponsiveWidth(); const [titleText] = useState("Memos"); @@ -29,7 +32,7 @@ const MobileHeader = (props: Props) => { className="font-bold text-lg leading-10 mr-1 text-ellipsis shrink-0 cursor-pointer overflow-hidden text-gray-700 dark:text-gray-300" onDoubleClick={() => location.reload()} > - {titleText} + {systemStatus.customizedProfile.name || titleText}
{children}