Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Toastify Message #340

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading