import React from 'react';
import { useAuth } from 'react-oidc-context';
import { LogIn, LogOut, User, Loader2 } from 'lucide-react';
export const AuthButton: React.FC = () => {
const auth = useAuth();
if (auth.isLoading) {
return (
);
}
if (auth.error) {
return (
Auth Error
);
}
if (auth.isAuthenticated) {
return (
{auth.user?.profile.preferred_username || auth.user?.profile.name || 'User'}
);
}
return (
);
};