Skip to content

Commit

Permalink
Merge pull request VanshKing30#340 from sailaja-adapa/Toast
Browse files Browse the repository at this point in the history
Added Toastify Message
  • Loading branch information
hustlerZzZ authored Jun 21, 2024
2 parents 23a976c + 848ac1e commit 43078d7
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/pages/Rateus.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React, { useState } from 'react';
import { ToastContainer, toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import Footer from "../components/Footer";
import Navbar from "../components/Navbar";

Expand All @@ -16,10 +18,9 @@ const RateUs = () => {

const handleSubmit = () => {
if (rating && feedback.trim() !== '') {
console.log('Rating:', rating);
console.log('Feedback:', feedback);
toast.success('Thank you for your feedback :)');
} else {
console.log("Please Fill All The Details :(");
toast.error('Please fill all the details :(');
}
};

Expand Down Expand Up @@ -67,6 +68,17 @@ const RateUs = () => {
</div>
</div>
<Footer />
<ToastContainer
position="top-center"
autoClose={5000}
hideProgressBar={false}
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
/>
</div>
);
};
Expand Down

0 comments on commit 43078d7

Please sign in to comment.