chore: dependency updates (#2229)

This commit is contained in:
Lucas Smith
2025-11-22 20:28:20 +11:00
committed by GitHub
parent 17c6098638
commit d2176627ca
103 changed files with 16694 additions and 72473 deletions

View File

@ -1,11 +1,10 @@
import { useEffect, useState } from 'react';
import { useHydrated } from '../lib/use-hydrated';
export const ClientOnly = async ({ children }: { children: React.ReactNode }) => {
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
}, []);
return mounted ? children : null;
type ClientOnlyProps = {
children: () => React.ReactNode;
fallback?: React.ReactNode;
};
export const ClientOnly = ({ children, fallback = null }: ClientOnlyProps) => {
return useHydrated() ? <>{children()}</> : <>{fallback}</>;
};