import { createContext, useContext, type ReactNode, type RefObject } from 'react' const PrimaryPageScrollAreaRefContext = createContext | null>(null) /** * The desktop primary column’s main `overflow-y: auto` node (see {@link PrimaryPageLayout}). * Feeds use this so {@link VirtualizedFeedRows} observes the same scrollport the user actually scrolls. */ export function PrimaryPageScrollAreaRefProvider({ scrollAreaRef, children }: { scrollAreaRef: RefObject children: ReactNode }) { return ( {children} ) } export function usePrimaryPageScrollAreaRefOptional(): RefObject | null { return useContext(PrimaryPageScrollAreaRefContext) }