mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 10:33:01 +00:00
improved loading screen with spinner
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
export default function Loading({ children }: { children?: React.ReactNode }) {
|
||||
import { Spinner } from "@/components/ui/spinner";
|
||||
|
||||
export default function Loading({ message, children }: { message?: string; children?: React.ReactNode }) {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center gap-4 w-full h-[100vh]">
|
||||
<h1>Loading...</h1>
|
||||
<Spinner className="size-6" />
|
||||
{message && (
|
||||
<span className="text-xs px-2 py-1 border-2 border-input border-dashed">{message}</span>
|
||||
)}
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user