Skip to content

Commit

Permalink
🐛 Fix sidebar and toc ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Sep 27, 2023
1 parent 9a0fabc commit 01025d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/theme-nonepress/src/theme/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import SidebarContent from "@theme/Sidebar/Content";
export default function Sidebar({ className }: Props): JSX.Element | null {
const { pathname } = useLocation();
const windowSize = useWindowSize();
const isMobile = windowSize === "mobile" || windowSize === "ssr";
const isMobile = windowSize === "mobile";

// const showAnnouncementBar = useShowAnnouncementBar();
const {
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-nonepress/src/theme/TOC/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TOCContent from "@theme/TOC/Content";

export default function TOC({ className }: Props): JSX.Element | null {
const windowSize = useWindowSize();
const isMobile = windowSize === "mobile" || windowSize === "ssr";
const isMobile = windowSize === "mobile";

const [tocContent] = useTOCContent();

Expand Down

0 comments on commit 01025d5

Please sign in to comment.