|
@@ -1,4 +1,4 @@
|
|
-import { useState } from "react";
|
|
|
|
|
|
+import { useEffect, useState } from "react";
|
|
import {
|
|
import {
|
|
Button,
|
|
Button,
|
|
Dialog,
|
|
Dialog,
|
|
@@ -28,6 +28,13 @@ const ProfileNew = (props: Props) => {
|
|
onSubmit(name, desc);
|
|
onSubmit(name, desc);
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ if (!open) {
|
|
|
|
+ setName("");
|
|
|
|
+ setDesc("");
|
|
|
|
+ }
|
|
|
|
+ }, [open]);
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<Dialog open={open} onClose={onClose}>
|
|
<Dialog open={open} onClose={onClose}>
|
|
<DialogTitle>Create Profile</DialogTitle>
|
|
<DialogTitle>Create Profile</DialogTitle>
|