Skip to content

Commit 796f222

Browse files
committed
Fix positioning of isDesktopViewport declaration in BlogPost component
1 parent 4c27298 commit 796f222

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/routes/blog.$.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ function BlogPost() {
7575
const { _splat: slug } = Route.useParams()
7676
const markdown = React.useMemo(() => parseSiteMarkdown(content), [content])
7777
const headings = markdown.headings
78-
const isDesktopViewport = useMediaQuery('(min-width: 768px)')
7978

8079
const isTocVisible = headings.length > 1
80+
const isDesktopViewport = useMediaQuery('(min-width: 768px)')
8181

8282
const markdownContainerRef = React.useRef<HTMLDivElement>(null)
8383
const [activeHeadings, setActiveHeadings] = React.useState<Array<string>>([])

0 commit comments

Comments
 (0)