Skip to content

Commit 521978d

Browse files
committed
fix: added form reset and comment
1 parent a86499c commit 521978d

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/components/OrgForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const OrgForm: FunctionComponent<OrgFormProps> = ({
2626
name="name"
2727
rules={{
2828
validate: (value) =>
29+
// Allows every character as long as one letter or number is given.
2930
/[a-z0-9]/i.test(value ?? "") ||
3031
"The name must contain at least one letter or number.",
3132
}}

src/components/OrgRegister.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ export default function OrgRegisterForm(props: Props) {
6262

6363
toast.success("Organization created successfully");
6464

65+
form.reset();
66+
6567
localStorage.setItem("lastActiveOrg", orgDTO.slug);
6668
// move the user to the newly created organization
6769
setTimeout(() => router.push(`/${orgDTO.slug}`), 0);

0 commit comments

Comments
 (0)