feat: start FAQ page

This commit is contained in:
2024-01-20 22:24:57 +00:00
parent a3ab088a82
commit 96467bd979
7 changed files with 141 additions and 100 deletions

View File

@ -0,0 +1,10 @@
import { ReactNode, useEffect, useState } from "react";
export function Async<T>({ loader, then }: { loader: () => Promise<T>, then: (v: T) => ReactNode }) {
const [res, setResult] = useState<T>();
useEffect(() => {
loader().then(setResult);
}, []);
if (!res) return;
return then(res);
}