notificationXXXX
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { notificationError, notificationSuccess } from "../services/Notifications";
|
||||
import { foundMsg, logFormData } from "../services/PhpApi";
|
||||
import './ContactForm.css';
|
||||
|
||||
@ -38,7 +38,7 @@ export default function DogContactForm(
|
||||
|
||||
if(!Object.values(formData).every(val => val.trim() !== ''))
|
||||
{
|
||||
toast.error('Bitte alle Felder ausfüllen!');
|
||||
notificationError('Bitte alle Felder ausfüllen!');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -67,12 +67,12 @@ export default function DogContactForm(
|
||||
|
||||
if(data.success)
|
||||
{
|
||||
toast.success('Eine Kopie wurde auch an ' + toEmail + ' geschickt!');
|
||||
toast.success('Nachricht gesendet!');
|
||||
notificationSuccess('Eine Kopie wurde auch an ' + toEmail + ' geschickt!');
|
||||
notificationSuccess('Nachricht gesendet!');
|
||||
}
|
||||
else if(!data.success && data.message)
|
||||
{
|
||||
toast.error(data.message);
|
||||
notificationError(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +80,6 @@ export default function DogContactForm(
|
||||
<>
|
||||
<div className="flexCenter">
|
||||
<div className="containerForm">
|
||||
<Toaster toastOptions={{ position: "top-center" }} />
|
||||
<form className="formForm" id='idForm' onSubmit={submitForm}>
|
||||
<div className="rowForm">
|
||||
<div>Bitte schreib eine Email:</div><div></div>
|
||||
|
||||
Reference in New Issue
Block a user