import { type ReactNode, useEffect, useState } from "react";

export function NoSSR(props: { children: ReactNode }) {
	const [hasMounted, setHasMounted] = useState(false);
	useEffect(() => {
		setHasMounted(true);
	}, []);
	return hasMounted ? <>{props.children}</> : null;
}
