import React, { Suspense } from 'react'; import { cva } from 'class-variance-authority'; import { useLocation, useRouter } from '@tanstack/react-router'; import { cn } from '@/lib/cn'; import ErrorBoundary from '@/components/elements/ErrorBoundary'; export type SpinnerSize = 'small' | 'base' | 'large'; interface Props { size?: SpinnerSize; centered?: boolean; isBlue?: boolean; children?: React.ReactNode; } type SpinnerComponentType = ((props: Props) => React.JSX.Element) & { displayName?: string; Size: Record<'SMALL' | 'BASE' | 'LARGE', SpinnerSize>; Suspense: ((props: Props) => React.JSX.Element) & { displayName?: string }; }; const spinnerSize = cva('', { variants: { size: { small: 'w-4 h-4 border-2', base: 'w-8 h-8 border-[3px]', large: 'w-16 h-16 border-[6px]', }, }, defaultVariants: { size: 'base', }, }); const SpinnerComponent = ({ size, isBlue }: Props) => ( ); const Spinner = (({ centered, ...props }: Props) => centered ? (