Skip to content

Commit

Permalink
- Fix the 'AddLinkedUser' dialog from configuration Page
Browse files Browse the repository at this point in the history
  • Loading branch information
mit-27 committed Feb 11, 2024
1 parent dc91abe commit f863aeb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const AddLinkedAccount = () => {
defaultValues: {
linkedUserIdentifier: "",
},

})

function onSubmit(values: z.infer<typeof formSchema>) {
Expand All @@ -90,6 +91,7 @@ const AddLinkedAccount = () => {
id_project: idProject,
mode: config.DISTRIBUTION
})
form.reset()
}


Expand Down Expand Up @@ -161,7 +163,7 @@ const AddLinkedAccount = () => {
{showNewLinkedUserDialog.import ? "You can upload a sheet of your existing linked users" : "Add a new linked user to your project"}
</DialogDescription>
</DialogHeader>
<Form {...form}>
<Form {...form} >
<form onSubmit={form.handleSubmit(onSubmit)}>
<div>
<div className="space-y-4 py-2 pb-4">
Expand Down Expand Up @@ -199,7 +201,7 @@ const AddLinkedAccount = () => {
</div>
</div>
<DialogFooter>
<Button variant="outline" onClick={() => setShowNewLinkedUserDialog({open: false})}>
<Button variant="outline" type='reset' onClick={() => {form.reset();setShowNewLinkedUserDialog({open: false})}}>
Cancel
</Button>
<Button variant="outline" type="submit">{showNewLinkedUserDialog.import ? "Import" : "Create"}</Button>
Expand Down

0 comments on commit f863aeb

Please sign in to comment.