Update next.js to recent version, style updates

This commit is contained in:
Aaron William Po
2023-11-25 22:06:53 -05:00
parent a72e2d70ff
commit 468c220eaa
6 changed files with 144 additions and 132 deletions

View File

@@ -28,9 +28,14 @@ const RegisterUserForm: FC = () => {
data: z.infer<typeof CreateUserValidationSchemaWithUsernameAndEmailCheck>,
) => {
try {
const loadingToast = toast.loading('Registering user...');
await sendRegisterUserRequest(data);
reset();
router.push('/', undefined, { shallow: true });
toast.remove(loadingToast);
toast.success('User registered!');
} catch (error) {
createErrorToast({
toast,