Files
reflector/www/app/(app)/AuthWrapper.tsx
Mathieu Virbel 7ddae5ddd5 refactor: remove api-types.ts compatibility layer
- 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
2025-08-29 16:35:33 -06:00

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}</>;
}