import { useSyncExternalStore } from 'react' /** True only after the client has hydrated (false on server + first client paint). */ export function useHydrated(): boolean { return useSyncExternalStore( () => () => {}, () => true, () => false, ) }