mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
- Migrated all 29 files from api-types.ts to use reflector-api.d.ts directly
- Removed $SourceKind manual enum in favor of OpenAPI-generated types
- Fixed unrelated Spinner component TypeScript error in AuthWrapper.tsx
- All imports now use: import type { components } from "path/to/reflector-api"
- Deleted api-types.ts file completely
29 lines
611 B
TypeScript
29 lines
611 B
TypeScript
"use client";
|
|
|
|
import { Flex, Spinner } from "@chakra-ui/react";
|
|
import useAuthReady from "../lib/useAuthReady";
|
|
|
|
export default function AuthWrapper({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const { isAuthReady, isLoading } = useAuthReady();
|
|
|
|
// Show spinner while auth is loading
|
|
if (isLoading || !isAuthReady) {
|
|
return (
|
|
<Flex
|
|
flexDir="column"
|
|
alignItems="center"
|
|
justifyContent="center"
|
|
h="calc(100vh - 80px)" // Account for header height
|
|
>
|
|
<Spinner size="xl" color="blue.500" />
|
|
</Flex>
|
|
);
|
|
}
|
|
|
|
return <>{children}</>;
|
|
}
|