diff --git a/docs/IMG_20230218_184419_227.jpg b/docs/IMG_20230218_184419_227.jpg new file mode 100755 index 0000000..2d3a4fa Binary files /dev/null and b/docs/IMG_20230218_184419_227.jpg differ diff --git a/docs/IMG_20230218_184426_227.jpg b/docs/IMG_20230218_184426_227.jpg new file mode 100755 index 0000000..41c75a9 Binary files /dev/null and b/docs/IMG_20230218_184426_227.jpg differ diff --git a/docs/IMG_20230218_184429_386.jpg b/docs/IMG_20230218_184429_386.jpg new file mode 100755 index 0000000..0afbb7e Binary files /dev/null and b/docs/IMG_20230218_184429_386.jpg differ diff --git a/src/components/Dog.css b/src/components/Dog.css index 2006ddc..04834dd 100644 --- a/src/components/Dog.css +++ b/src/components/Dog.css @@ -9,8 +9,3 @@ { margin: 5px; } - -button -{ - max-width: 30%; -} \ No newline at end of file diff --git a/src/components/InputForm.css b/src/components/InputForm.css index 22db617..66954b2 100644 --- a/src/components/InputForm.css +++ b/src/components/InputForm.css @@ -30,7 +30,7 @@ form flex-direction: column; } -.InputForm button, input +.InputForm button, input[type=file] { background-color: #aa0404; color: white; @@ -42,6 +42,10 @@ form width: auto; margin-top: 5px; } +.InputForm .IF_pw button +{ + color: black; +} .InputForm input { diff --git a/src/components/Login.tsx b/src/components/Login.tsx index 83e8203..edabef4 100644 --- a/src/components/Login.tsx +++ b/src/components/Login.tsx @@ -84,7 +84,7 @@ const Login = () => id="email" value={formData.email} required /> - ({ email:'', name:'', phone:'', @@ -51,7 +59,7 @@ function Profil() }); } - let formData_loc = + let formData_loc: TFormData = { email: '', name: '', @@ -99,6 +107,21 @@ function Profil() } } + async function submitData(fd: TFormData) + { + if(!Object.values(fd).every(val => val?.trim() !== '')) + { + notificationError('Bitte alle Felder ausfüllen!'); + return; + } + setFormData(fd); + + const data = await updateDog(fd); + mutate(); + showData(data); + + } + const submitForm = async (e: React.FormEvent) => { e.preventDefault(); @@ -106,17 +129,14 @@ function Profil() console.log(formData_loc); console.log(formDataSave.current); - - if(!Object.values(formData).every(val => val?.trim() !== '')) + if( formData.email || formData.name || formData.name || formData.name ) { - notificationError('Bitte alle Felder ausfüllen!'); - return; + submitData(formData); + } + else + { + submitData(formData_loc); } - setFormData(formData); - - const data = await updateDog(formData); - mutate(); - showData(data); } const qr_refresh = (e: React.MouseEvent) => diff --git a/src/components/Register.tsx b/src/components/Register.tsx index 9d47c33..b8b4cdf 100644 --- a/src/components/Register.tsx +++ b/src/components/Register.tsx @@ -65,7 +65,7 @@ const Register = () => id="email" value={formData.email} required /> - placeholder="Passwort" id="password" value={formData.password} required/> -