Skip to content

Commit 43078d7

Browse files
authored
Merge pull request #340 from sailaja-adapa/Toast
Added Toastify Message
2 parents 23a976c + 848ac1e commit 43078d7

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/pages/Rateus.jsx

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React, { useState } from 'react';
2+
import { ToastContainer, toast } from 'react-toastify';
3+
import 'react-toastify/dist/ReactToastify.css';
24
import Footer from "../components/Footer";
35
import Navbar from "../components/Navbar";
46

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

1719
const handleSubmit = () => {
1820
if (rating && feedback.trim() !== '') {
19-
console.log('Rating:', rating);
20-
console.log('Feedback:', feedback);
21+
toast.success('Thank you for your feedback :)');
2122
} else {
22-
console.log("Please Fill All The Details :(");
23+
toast.error('Please fill all the details :(');
2324
}
2425
};
2526

@@ -67,6 +68,17 @@ const RateUs = () => {
6768
</div>
6869
</div>
6970
<Footer />
71+
<ToastContainer
72+
position="top-center"
73+
autoClose={5000}
74+
hideProgressBar={false}
75+
newestOnTop={false}
76+
closeOnClick
77+
rtl={false}
78+
pauseOnFocusLoss
79+
draggable
80+
pauseOnHover
81+
/>
7082
</div>
7183
);
7284
};

0 commit comments

Comments
 (0)