diff --git a/frontend/package.json b/frontend/package.json
index 209f24822..537c38b38 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -52,6 +52,7 @@
"react-router-dom": "^5.2.0",
"react-router-transition": "^2.1.0",
"react-scripts": "4.0.1",
+ "react-toastify": "8.0.0",
"react-truncate": "^2.4.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
diff --git a/frontend/src/routes/FacilityBooking/ViewFacility/index.tsx b/frontend/src/routes/FacilityBooking/ViewFacility/index.tsx
index 144861645..93ee9836f 100644
--- a/frontend/src/routes/FacilityBooking/ViewFacility/index.tsx
+++ b/frontend/src/routes/FacilityBooking/ViewFacility/index.tsx
@@ -24,6 +24,8 @@ import TopNavBarRevamp from '../../../components/TopNavBarRevamp'
import { setClickedDate } from '../../../store/calendar/actions'
import { BookingStatus } from '../../../store/facilityBooking/types'
import ConflictBookingModal from '../ViewConflicts/ConflictBookingModal'
+import { ToastContainer, toast } from 'react-toastify'
+import 'react-toastify/dist/ReactToastify.css'
const MainContainer = styled.div`
width: 100%;
@@ -75,6 +77,17 @@ export default function ViewFacility() {
if (bookingStatus === BookingStatus.SUCCESS) {
dispatch(setBookingStatus(BookingStatus.INITIAL))
console.log('sucessssssssss')
+ // toast notification to inform of success booking
+ toast.success('Booking was Successfull !', {
+ position: 'bottom-right',
+ autoClose: 3000,
+ hideProgressBar: false,
+ closeOnClick: true,
+ pauseOnHover: true,
+ draggable: true,
+ progress: undefined,
+ theme: 'light',
+ })
}
if (bookingStatus === BookingStatus.CONFLICT) {
setModalIsOpen(true)
@@ -95,6 +108,7 @@ export default function ViewFacility() {
+
>
)
}
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index 8d53e3b5c..64b39d475 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -3642,6 +3642,11 @@ clone-deep@^4.0.1:
kind-of "^6.0.2"
shallow-clone "^3.0.0"
+clsx@^1.1.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12"
+ integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==
+
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz"
@@ -11154,6 +11159,13 @@ react-test-renderer@^18.1.0:
react-shallow-renderer "^16.15.0"
scheduler "^0.23.0"
+react-toastify@8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/react-toastify/-/react-toastify-8.0.0.tgz#f2ac0801610a72610628d739189078871ad02235"
+ integrity sha512-7a5uhwbJ5Ivp5QyJN8P9M8g+7wksJt51QuYAZW0c3pDOh0Jx8lH7XzNHzzJg4NHup9n4zcqH9rwXknnyzYg2OA==
+ dependencies:
+ clsx "^1.1.1"
+
react-truncate@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/react-truncate/-/react-truncate-2.4.0.tgz"