feat: show identity match hint on registration success page
When a pending identity match is detected after volunteer registration, the API now returns has_existing_account in the response. The success page shows a login suggestion card so the volunteer can link their registration to their existing account. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,10 +22,15 @@ export function useRegistrationData(eventSlug: Ref<string>) {
|
||||
})
|
||||
}
|
||||
|
||||
export interface VolunteerRegistrationResponse {
|
||||
person: Record<string, unknown>
|
||||
has_existing_account: boolean
|
||||
}
|
||||
|
||||
export function useSubmitRegistration() {
|
||||
return useMutation({
|
||||
mutationFn: async ({ eventId, form }: { eventId: string; form: VolunteerRegistrationForm }) => {
|
||||
const { data } = await apiClient.post<ApiResponse<Record<string, unknown>>>(
|
||||
const { data } = await apiClient.post<ApiResponse<VolunteerRegistrationResponse>>(
|
||||
`/events/${eventId}/volunteer-register`,
|
||||
form,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user