Skip to content

Commit eefd557

Browse files
committed
Update RecentPostsWidget visibility logic based on desktop viewport
1 parent 796f222 commit eefd557

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/LibraryLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ export function LibraryLayout({
884884
surface: 'docs_rail',
885885
})
886886
const shouldShowDocsPartnerSlot = useMediaQuery('(max-width: 767.98px)')
887+
const isDesktopViewport = useMediaQuery('(min-width: 768px)')
887888

888889
const groupInitialOpenState = React.useMemo(() => {
889890
return visibleMenuConfig.reduce<Record<string, boolean>>(
@@ -1412,7 +1413,7 @@ export function LibraryLayout({
14121413
partners={activePartners}
14131414
/>
14141415
<div className="hidden md:block border border-gray-500/20 rounded-l-lg overflow-hidden w-full">
1415-
<RecentPostsWidget enabled={!shouldShowDocsPartnerSlot} />
1416+
<RecentPostsWidget enabled={isDesktopViewport} />
14161417
</div>
14171418
</RightRail>
14181419
)}

0 commit comments

Comments
 (0)