'use client' import { Stack, Title, Container, Paper, Button, Text, List } from "@pikku/mantine/core" import { useMutation, useQueryClient } from '@tanstack/react-query' import { pikku } from '@/pikku/http' import { ApplicantStatuses } from '@heygermany/sdk' import { asI18n } from '@pikku/react' export const Invalid: React.FunctionComponent<{ name: string, candidateId: string }> = ({ name, candidateId }) => { const queryClient = useQueryClient() const resetApplicationMutation = useMutation({ mutationFn: async () => { await pikku().patch('/candidate/:candidateId', { candidateId, status: ApplicantStatuses.INITIAL, submittedAt: null }) }, onSuccess: async () => { await queryClient.invalidateQueries({ queryKey: ['candidate'] }) } }) return ( {asI18n(`Hi ${name},`)} {asI18n('Thanks for uploading your documents!')} {asI18n('We've reviewed your files, but unfortunately, one or more of them couldn't be processed for your personal evaluation.')} {asI18n('This can happen if:')} {asI18n('The document is incomplete or blurry')} {asI18n('The content is unclear or unreadable')} {asI18n('The file you uploaded is not related to the document we requested')} {asI18n('Please upload a clear and complete version of the missing or invalid document(s) so we can continue your evaluation.')} ) }