import { Link } from 'react-router-dom' import { useAuth } from '../auth/AuthProvider' import { useContinueWithRole } from '../hooks/useContinueWithRole' export function RoleSelectPage() { const { user, roles } = useAuth() const { continueWithRole, busy, busyRole, error } = useContinueWithRole() return (
Al Rahma Sunday School

Select Your Role to Log In

{user?.name ? `${user.name}, you` : 'You'} have multiple roles. Choose how you want to continue.

{roles.map((role) => { const label = role.replace(/_/g, ' ').replace(/\b\w/g, (letter) => letter.toUpperCase()) return (
) })}
{error ? (
{error}
) : null}
) }