Optimzed code and updated gitignore

This commit is contained in:
2023-10-30 10:22:51 +07:00
parent 59e429d678
commit f37cd5e30f
3 changed files with 7 additions and 91 deletions
+5 -7
View File
@@ -66,13 +66,11 @@ const UserForm = ({
isAdd,
}: IUserFormProp) => {
const [reset, setReset] = useState(true);
let initialValue: string = '';
if (isAdd) {
initialValue = '';
} else if (user) {
initialValue = user.id;
}
// prettier-ignore
const initialValue: string = isAdd
? ''
: user!
&& user.id;
// Define your state schema
const stateSchema: TStateSchema = {