From 0a73716e5cd15ccb7f6d0bfcdceb8297c9c58af7 Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Thu, 19 May 2022 15:36:32 +0800 Subject: [PATCH] fix: add home page to show tab routes --- src/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 161eb5e..d1185b3 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -181,7 +181,9 @@ function useRouteState(): RouteState { export function useAdaptMainUIStyle(show: boolean, tabsWidth?: number | null) { const { template } = useRouteState(); const shouldShow = - show && ["/all-journals", "/page/:name", "/file/:path"].includes(template); + show && + (!template || + ["/", "/all-journals", "/page/:name", "/file/:path"].includes(template)); const docRef = React.useRef(document.documentElement); const isHovering = useHoverDirty(docRef); React.useEffect(() => {