Skip to content

Commit

Permalink
Merge pull request #168 from risixdzn/test
Browse files Browse the repository at this point in the history
🎯 `Fix` Fixes #165 - Crash on register auth routes
  • Loading branch information
risixdzn authored Aug 30, 2024
2 parents 63ff555 + 56e2416 commit ab79c61
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions components/Auth/Login/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function LoginForm() {

const renderForm = () => {
return (
<>
<div>
<Label htmlFor='email'>Email</Label>
<Input
disabled={loading}
Expand Down Expand Up @@ -74,7 +74,7 @@ export default function LoginForm() {
})}
/>
</div>
</>
</div>
);
};

Expand Down
8 changes: 4 additions & 4 deletions components/Auth/Register/RegistrationFormProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default function RegistrationFormProvider() {
};

return (
<>
<div>
{!showForm && (
<>
<div>
<h3 className='text-xl font-semibold leading-none tracking-tight'>
Tipo de conta:
</h3>
Expand Down Expand Up @@ -93,14 +93,14 @@ export default function RegistrationFormProvider() {
<Button className='w-full mt-2' onClick={handleRadioSubmit}>
Continuar
</Button>
</>
</div>
)}
{showForm && accountType === "gymOwner" && (
<RegisterGymOwnerForm setShowForm={setShowForm} />
)}
{showForm && accountType === "member" && (
<RegisterMemberForm setShowForm={setShowForm} />
)}
</>
</div>
);
}
4 changes: 2 additions & 2 deletions components/Auth/Register/Steps/RegisterStep1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function RegisterStep1({ register, errors, loading }: StepProps)
const typedRegister = register as TypedRegister;

return (
<>
<div>
<div>
<Label htmlFor='displayName'>Nome de exibição</Label>
<Input
Expand Down Expand Up @@ -97,6 +97,6 @@ export default function RegisterStep1({ register, errors, loading }: StepProps)
<p className='text-xs text-destructive mt-2'>{errors.username.message}</p>
)}
</div>
</>
</div>
);
}
4 changes: 2 additions & 2 deletions components/Auth/Register/Steps/RegisterStep2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function RegisterStep2({ register, errors, loading }: StepProps)
const typedRegister = register as TypedRegister;

return (
<>
<div>
<Label htmlFor='email'>Email</Label>
<Input
disabled={loading}
Expand All @@ -53,6 +53,6 @@ export default function RegisterStep2({ register, errors, loading }: StepProps)
{errors.email && (
<p className='text-xs text-destructive mt-2'>{errors.email.message}</p>
)}
</>
</div>
);
}
4 changes: 2 additions & 2 deletions components/Auth/Register/Steps/RegisterStep3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function RegisterStep3({ register, errors, watch, loading }: Step
const typedWatch = watch as TypedWatch;

return (
<>
<div>
<div>
<Label htmlFor='password'>Senha</Label>
<TooltipProvider delayDuration={0}>
Expand Down Expand Up @@ -119,6 +119,6 @@ export default function RegisterStep3({ register, errors, watch, loading }: Step
</p>
)}
</div>
</>
</div>
);
}
4 changes: 2 additions & 2 deletions components/Auth/Register/Steps/RegisterStep4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function RegisterStep4({ register, errors, loading }: StepProps)
const typedErrors = errors as TypedErrors;

return (
<>
<div>
<div>
<Label htmlFor='gymName'>Nome da academia</Label>
<Input
Expand Down Expand Up @@ -105,6 +105,6 @@ export default function RegisterStep4({ register, errors, loading }: StepProps)
</p>
)}
</div>
</>
</div>
);
}
2 changes: 1 addition & 1 deletion components/Auth/Register/ui/SubmitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function SubmitButton({
) : signUpSuccess ? (
<Check className='absolute' />
) : (
<>{text}</>
<span>{text}</span>
)}
</button>
);
Expand Down

0 comments on commit ab79c61

Please sign in to comment.