Merge branch 'feat/refresh' into chore/github-templates

This commit is contained in:
Ephraim Atta-Duncan
2023-10-07 02:07:54 +00:00
committed by GitHub
3 changed files with 9 additions and 7 deletions

View File

@@ -391,6 +391,7 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => {
<SignaturePad <SignaturePad
className="aspect-video w-full rounded-md border" className="aspect-video w-full rounded-md border"
defaultValue={signatureDataUrl || ''}
onChange={setDraftSignatureDataUrl} onChange={setDraftSignatureDataUrl}
/> />

View File

@@ -12,12 +12,16 @@ export const authRouter = router({
return await createUser({ name, email, password, signature }); return await createUser({ name, email, password, signature });
} catch (err) { } catch (err) {
console.error(err); let message =
'We were unable to create your account. Please review the information you provided and try again.';
if (err instanceof Error && err.message === 'User already exists') {
message = 'User with this email already exists. Please use a different email address.';
}
throw new TRPCError({ throw new TRPCError({
code: 'BAD_REQUEST', code: 'BAD_REQUEST',
message: message,
'We were unable to create your account. Please review the information you provided and try again.',
}); });
} }
}), }),

View File

@@ -97,10 +97,7 @@ export const DocumentFlowFormContainerStep = ({
return ( return (
<div> <div>
<p className="text-muted-foreground text-sm"> <p className="text-muted-foreground text-sm">
{title}{' '} Step <span>{`${step} of ${maxStep}`}</span>
<span>
({step}/{maxStep})
</span>
</p> </p>
<div className="bg-muted relative mt-4 h-[2px] rounded-md"> <div className="bg-muted relative mt-4 h-[2px] rounded-md">