diff --git a/components/loading.tsx b/components/loading.tsx new file mode 100644 index 0000000..fb53a3d --- /dev/null +++ b/components/loading.tsx @@ -0,0 +1,20 @@ +import Spinner from './spinner' + +export default function Loading({ + loading, + children, +}: { + loading: boolean + children: any +}) { + return ( +
+
{children}
+ {loading && ( +
+ +
+ )} +
+ ) +} diff --git a/components/spinner.tsx b/components/spinner.tsx new file mode 100644 index 0000000..4adcc23 --- /dev/null +++ b/components/spinner.tsx @@ -0,0 +1,24 @@ +export default function Spinner() { + return ( + + + + + ) +}