Skip to content

Commit

Permalink
address lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Angel Afube committed Aug 16, 2024
1 parent 90dfee9 commit 957c721
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/(auth-routes)/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,16 @@ const Register = () => {

const onSubmit = async (values: z.infer<typeof RegisterSchema>) => {
const apiUrl = await getApiUrl();

startTransition(async () => {
await registerUser(values).then(async (data) => {
if (data.status === 201) {

router.push("/login");
// Handle redirection based on createOrg condition
if (createOrg) {
router.push("/register/organisation");
} else {
router.push("/login");
}
}

toast({
title: "Account created successfully",
Expand Down

0 comments on commit 957c721

Please sign in to comment.