refactor: login

This commit is contained in:
Tristan Yang
2022-07-31 22:57:37 +08:00
parent 3b35e18150
commit b83d687e1e
4 changed files with 20 additions and 13 deletions
+2 -1
View File
@@ -16,8 +16,9 @@ export default function ConfigFirebase() {
};
const handleChange = (evt: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
const newValue = evt.target.value;
const { type } = evt.target.dataset;
const { type = "" } = evt.target.dataset;
setValues((prev) => {
if (!prev) return prev;
return { ...prev, [type]: newValue };
});
};