import * as React from 'react'; import Alert from '@mui/material/Alert'; import Box from '@mui/material/Box'; import { config } from '@/config'; import type { AuthStrategy } from '@/lib/auth/strategy'; interface StrategyGuardProps { children: React.ReactNode; expected: keyof typeof AuthStrategy; } export function StrategyGuard({ children, expected }: StrategyGuardProps): React.JSX.Element { if (config.auth.strategy !== expected) { return ( To render this page, you need to configure the auth strategy to "{expected}" ); } return {children}; }