From 578f9bda64cce36807b66c8b44dda7434fa95ef2 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 16 Oct 2024 16:19:07 +0530 Subject: [PATCH 1/5] Added the member ship page along with its content --- frontend/src/components/Membership.jsx | 164 ++++++++++++++++++++++ frontend/src/components/Shared/Navbar.jsx | 2 + frontend/src/router/index.jsx | 6 +- 3 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 frontend/src/components/Membership.jsx diff --git a/frontend/src/components/Membership.jsx b/frontend/src/components/Membership.jsx new file mode 100644 index 00000000..a5c9f983 --- /dev/null +++ b/frontend/src/components/Membership.jsx @@ -0,0 +1,164 @@ +/* eslint-disable prettier/prettier */ +import React, { useState } from 'react'; +import { motion } from 'framer-motion'; +import { GiCheckMark } from 'react-icons/gi'; +import { useNavigate } from 'react-router-dom'; + +const membershipData = [ + { + title: "Foods + Games Membership", + features: [ + "Access to both the food menu and gaming lounge", + "Special discounts on selected food items", + "Free gaming credits each month", + "Exclusive access to members-only events" + ], + price: "$50/month", + }, + { + title: "Games Only Membership", + features: [ + "Unlimited access to all games", + "Free gaming credits every week", + "Invitations to members-only gaming tournaments" + ], + price: "$30/month", + }, + { + title: "Customizable Add-ons", + features: [ + "Free food on game days", + "Extra gaming time", + "Birthday party discounts", + "Free gaming credits every week", + "Invitations to members-only gaming tournaments", + "Exclusive access to members-only events" + ], + price: "Varies", + }, +]; + +const containerVariants = { + hidden: { opacity: 0, y: 50 }, + visible: { + opacity: 1, + y: 0, + transition: { + type: "spring", + stiffness: 50, + damping: 20, + staggerChildren: 0.2, + }, + }, +}; + +const cardVariants = { + hidden: { opacity: 0, y: 50 }, + visible: { opacity: 1, y: 0 }, +}; + +const Membership = () => { + const navigate = useNavigate(); + const [isModalOpen, setIsModalOpen] = useState(false); + const [selectedFeatures, setSelectedFeatures] = useState({}); + + const handleFeatureChange = (feature) => { + setSelectedFeatures((prev) => ({ + ...prev, + [feature]: !prev[feature], + })); + }; + + const handleNext = () => { + // Here you can handle selectedFeatures if needed + navigate('/signup'); + }; + + return ( + +
+

Membership Plans

+

+ Choose the plan that suits your needs and start enjoying exclusive perks! +

+
+ +
+ {membershipData.map((plan, index) => ( + +

{plan.title}

+
    + {plan.features.map((feature, idx) => ( +
  • + {feature} +
  • + ))} +
+
{plan.price}
+ {plan.title === "Customizable Add-ons" ? ( + + ) : ( + + )} +
+ ))} +
+ + {/* Modal for Customizable Add-ons */} + {isModalOpen && ( +
+
+

Select Your Add-ons

+
+ {membershipData[2].features.map((feature, idx) => ( + + ))} +
+ + +
+
+ )} +
+ ); +}; + +export default Membership; diff --git a/frontend/src/components/Shared/Navbar.jsx b/frontend/src/components/Shared/Navbar.jsx index 2b7c1a24..482056a9 100644 --- a/frontend/src/components/Shared/Navbar.jsx +++ b/frontend/src/components/Shared/Navbar.jsx @@ -18,7 +18,9 @@ const Navbar = () => { { name: 'MENU', path: '/menu' }, { name: 'RESERVATION', path: '/reservation' }, { name: 'BOARDGAMES', path: '/boardgame' }, + { name: 'MEMBERSHIP', path: '/membership' }, // Add Membership here ]; + useEffect(() => { setToken(Cookies.get('authToken')); }); diff --git a/frontend/src/router/index.jsx b/frontend/src/router/index.jsx index 994e6334..a14a06db 100644 --- a/frontend/src/router/index.jsx +++ b/frontend/src/router/index.jsx @@ -20,10 +20,10 @@ import ResetPassword from '../components/Pages/ResetPassword'; import Admin from '../components/Pages/Admin'; import VerifyOtp from '../components/Pages/VerifyOtp'; import EmailVerify from '../components/Pages/EmailVerify'; - +import Membership from '../components/Membership'; const router = createBrowserRouter( createRoutesFromElements( - }> + }> } /> } /> } /> @@ -38,6 +38,8 @@ const router = createBrowserRouter( } /> } /> } /> + } /> + ) ); From f09ae629c25316bac658307b82cff83807a0d2e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:40:11 +0000 Subject: [PATCH 2/5] docs(contributor): contrib-readme-action has updated readme --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 61d68ce6..c4bc00b7 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,15 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Navneet Dadhich + + + Jay-1409 +
+ Jay shah +
+ + + Aditya90456 @@ -286,8 +295,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Aditya Bakshi - - tanishirai @@ -323,6 +330,8 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Sawan kushwah + + devxMani @@ -330,8 +339,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made MANI - - Ayush215mb @@ -360,13 +367,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Jai Dhingra - - - Jay-1409 -
- Jay shah -
- Mohitranag18 From a45d920575ff753ece841466a314853b9eef6f93 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:30:21 +0000 Subject: [PATCH 3/5] docs(contributor): contrib-readme-action has updated readme --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 61c0180c..9204884b 100644 --- a/README.md +++ b/README.md @@ -353,6 +353,13 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Ali Gates + + + chikatlarakesh +
+ CHIKATLA RAKESH +
+ mishradev1 @@ -367,6 +374,8 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Jai Dhingra + + Mohitranag18 @@ -374,8 +383,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Mohit Rana - - MutiatBash @@ -411,6 +418,8 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Vaibhav-Kumar-K-R + + lade6501 From 3a1b6cbfb5b5fcb2d1e601fbe559e96b0e08d5ca Mon Sep 17 00:00:00 2001 From: Jay-1409 Date: Thu, 17 Oct 2024 21:06:38 +0530 Subject: [PATCH 4/5] Theme matched fot the membership page --- frontend/src/components/Membership.jsx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/Membership.jsx b/frontend/src/components/Membership.jsx index a5c9f983..908ece7b 100644 --- a/frontend/src/components/Membership.jsx +++ b/frontend/src/components/Membership.jsx @@ -70,20 +70,19 @@ const Membership = () => { }; const handleNext = () => { - // Here you can handle selectedFeatures if needed navigate('/signup'); }; return (
-

Membership Plans

-

+

Membership Plans

+

Choose the plan that suits your needs and start enjoying exclusive perks!

@@ -92,7 +91,7 @@ const Membership = () => { {membershipData.map((plan, index) => ( @@ -107,14 +106,14 @@ const Membership = () => {
{plan.price}
{plan.title === "Customizable Add-ons" ? ( ) : ( From 6a85c7e2f23a3b6a75c0775043b9007ef2598bc2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:36:57 +0000 Subject: [PATCH 5/5] docs(contributor): contrib-readme-action has updated readme --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9204884b..12334fc1 100644 --- a/README.md +++ b/README.md @@ -245,10 +245,17 @@ We extend our heartfelt gratitude to all the amazing contributors who have made -
- PavanTeja2005 + + Jay-1409
- PavanTeja2005 + Jay shah +
+ + + + vishnuprasad2004 +
+ Vishnu Prasad Korada
@@ -259,10 +266,10 @@ We extend our heartfelt gratitude to all the amazing contributors who have made - - vishnuprasad2004 + + PavanTeja2005
- Vishnu Prasad Korada + PavanTeja2005
@@ -278,13 +285,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
Navneet Dadhich - - - - Jay-1409 -
- Jay shah -