"use client"; import * as React from "react"; import { cn } from "./lib/utils"; export interface PullRefreshProps extends React.HTMLAttributes { onRefresh?: () => Promise | void; children?: React.ReactNode; } /** Pull to refresh wrapper with stamp spinner. */ export function PullRefresh({ onRefresh, children, className, ...props }: PullRefreshProps) { const [spinning, setSpinning] = React.useState(false); const [flash, setFlash] = React.useState(0); const refresh = async () => { if (spinning) return; setSpinning(true); await onRefresh?.(); setSpinning(false); setFlash((f) => f + 1); }; return (
Feed gate
{children ?? "Gate 3 admissions are current as of 19:30."}
); }