diff --git a/frontend/src/Component/Rateus.js b/frontend/src/Component/Rateus.js index 4f46ce08..1e1c861d 100644 --- a/frontend/src/Component/Rateus.js +++ b/frontend/src/Component/Rateus.js @@ -1,4 +1,6 @@ import React, { useState } from "react"; +import { ToastContainer, toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; import "./../style/Rateus.css"; function RateUsComponent({ previousContent }) { @@ -19,35 +21,47 @@ function RateUsComponent({ previousContent }) { // Reset the state after submitting setRating(0); setFeedback(""); - } + // Show toast message + toast.success("Thanks For Your Feedback :)", { + position: "top-center" + }); + } else { + toast.error("Please Enter All Details :(", { + position: "top-center" + }); + } }; return ( -
-
-

Rate Our Website

-
- {[1, 2, 3, 4, 5].map((star) => ( - handleStarClick(star)} - > - ★ - - ))} + <> +
+
+

Rate Our Website

+
+ {[1, 2, 3, 4, 5].map((star) => ( + handleStarClick(star)} + > + ★ + + ))} +
+ +
- -
-
+ + ); } + export default RateUsComponent;