Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
353 B · 13 lines
TSX
at main
1234567891011121314"use client";import { useEffect } from "react";import { create } from "zustand";
export const useHasPageLoaded = create(() => false);export function InitialPageLoad(props: { children: React.ReactNode }) { useEffect(() => { setTimeout(() => { useHasPageLoaded.setState(() => true); }, 80); }, []); return <>{props.children}</>;}