mirror of
https://github.com/hex248/sprint.git
synced 2026-02-09 02:33:02 +00:00
loading page
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import type { UserRecord } from "@issue/shared";
|
import type { UserRecord } from "@issue/shared";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import LogInForm from "./login-form";
|
import Loading from "@/components/loading";
|
||||||
|
import LogInForm from "@/components/login-form";
|
||||||
|
|
||||||
type AuthProviderProps = {
|
type AuthProviderProps = {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
@@ -48,5 +49,9 @@ export function Auth({ children }: AuthProviderProps) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
return <>loading...</>;
|
return (
|
||||||
|
<Loading>
|
||||||
|
<span className="text-xs px-2 py-1 bg-input">Understanding your authentication state</span>
|
||||||
|
</Loading>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
8
packages/frontend/src/components/loading.tsx
Normal file
8
packages/frontend/src/components/loading.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
export default function Loading({ children }: { children?: React.ReactNode }) {
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col items-center justify-center gap-4 w-full h-[100vh]">
|
||||||
|
<h1>Loading...</h1>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user