import { Link } from 'react-router-dom' import { useAuth } from '../../auth/AuthProvider' import { useContinueWithRole } from '../../hooks/useContinueWithRole' /** CI `user/welcome_back.php` — multi-role picker (same behavior as `/app/select-role`). */ export function WelcomeBackPage() { const { user, roles } = useAuth() const { continueWithRole, busy, busyRole, error } = useContinueWithRole() return (
{ ;(ev.target as HTMLImageElement).style.display = 'none' }} />
Al Rahma Sunday School

Welcome back!

As your account has multiple roles in the portal, select how you want to continue:

{roles.map((role) => { const label = role.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase()) return ( ) })}
{user?.name ? (

Signed in as {user.name}

) : null} {error ?
{error}
: null}
Alternative layout (same action)
) }