Skip to content

Commit

Permalink
fix: add home page to show tab routes
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed May 19, 2022
1 parent 3892dee commit 0a73716
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 0a73716

Please sign in to comment.