diff --git a/src/pages/Home/LandingPage.css b/src/pages/Home/LandingPage.css index 318eadd5..35b05e9e 100644 --- a/src/pages/Home/LandingPage.css +++ b/src/pages/Home/LandingPage.css @@ -299,7 +299,7 @@ nav.layout-navbar.navbar-active::after { color: #d3d4dc; } .landing-footer .footer-bottom { - background-color: #282c3e; + background-color: #f44336; } .landing-footer .footer-link { transition: all 0.2s ease-in-out; @@ -312,6 +312,7 @@ nav.layout-navbar.navbar-active::after { padding-bottom: 1.3rem; border-top-left-radius: 1.75rem; border-top-right-radius: 1.75rem; + background-color: #f44336; } @media (max-width: 767.98px) { .landing-footer .footer-top { diff --git a/src/pages/Home/LandingPage.jsx b/src/pages/Home/LandingPage.jsx index 6d5a44ca..35b01202 100644 --- a/src/pages/Home/LandingPage.jsx +++ b/src/pages/Home/LandingPage.jsx @@ -591,14 +591,14 @@ const LandingPage = () => { FAQ

- Frequently asked - - questions - + Questions + {/* laptop charging + /> */}

@@ -816,19 +816,26 @@ const LandingPage = () => {

+
+ hero elements +
{" "}

- Let's work - laptop charging + /> */} - together + Together

Any question or remark? just write us a message @@ -873,15 +880,15 @@ const LandingPage = () => {

-

+

Ready to Get Started? -
-
- Start your project with a 14-day free trial
- +
+ Start your project with a free trial +
+ {/*
Get Started - {" "} + {" "} */} {
-
- hero elements -
@@ -1056,7 +1056,10 @@ const LandingPage = () => { {/* Footer: Start */} diff --git a/src/pages/Home/PlanCardSkeleton.jsx b/src/pages/Home/PlanCardSkeleton.jsx new file mode 100644 index 00000000..837ea686 --- /dev/null +++ b/src/pages/Home/PlanCardSkeleton.jsx @@ -0,0 +1,44 @@ +import React from "react"; + +const SubscriptionPlanSkeleton = () => { + return ( +
+
+ {/* Header */} +
+
+
+
+
+ + {/* Price */} +
+
+
+ + {/* Storage & Trial */} +
+
+
+
+ + {/* Features */} +
+ Features +
+ + + {/* Button */} +
+
+
+ ); +}; + +export default SubscriptionPlanSkeleton; diff --git a/src/pages/Home/SubscriptionPlans.jsx b/src/pages/Home/SubscriptionPlans.jsx index 0d44472c..24be62f9 100644 --- a/src/pages/Home/SubscriptionPlans.jsx +++ b/src/pages/Home/SubscriptionPlans.jsx @@ -1,115 +1,7 @@ -// // src/components/SubscriptionPlans.jsx -// import React, { useState, useEffect } from "react"; -// import axios from "axios"; - -// const SubscriptionPlans = () => { -// const [plans, setPlans] = useState([]); -// const [frequency, setFrequency] = useState(1); // 1=Monthly, 2=Quarterly, 3=Half-Yearly, 4=Yearly -// const [loading, setLoading] = useState(false); - -// useEffect(() => { -// const fetchPlans = async () => { -// try { -// setLoading(true); -// const res = await axios.get( -// `/api/market/list/subscription-plan?frequency=${frequency}` -// ); -// setPlans(res.data?.data || []); -// } catch (err) { -// console.error("Error fetching plans:", err); -// } finally { -// setLoading(false); -// } -// }; - -// fetchPlans(); -// }, [frequency]); - -// return ( -//
-// {/* Frequency Switcher */} -//
-//
-// {["Monthly", "Quarterly", "Half-Yearly", "Yearly"].map((label, idx) => ( -// -// ))} -//
-//
- -// {/* Cards */} -//
-// {loading ? ( -//
Loading...
-// ) : plans.length === 0 ? ( -//
No plans found
-// ) : ( -// plans.map((plan) => ( -//
-//
-//
-//

{plan.planName}

-//

{plan.description}

-//
-// -// {plan.currency?.symbol} -// {plan.price} -// -// /mo -//
-//
-// Max Users: {plan.maxUser} | Storage: {plan.maxStorage} MB -//
-//
- -//
-//
    -// {plan.features?.modules && -// Object.values(plan.features.modules).map((mod) => ( -//
  • -// -// {mod.name}{" "} -// {mod.enabled ? ( -// Enabled -// ) : ( -// Disabled -// )} -//
  • -// ))} -//
  • -// -// Support:{" "} -// {plan.features?.supports?.prioritySupport -// ? "Priority" -// : plan.features?.supports?.phoneSupport -// ? "Phone & Email" -// : "Email Only"} -//
  • -//
-//
- -//
-// -//
-//
-//
-// )) -// )} -//
-//
-// ); -// }; - -// export default SubscriptionPlans; - import React, { useState, useEffect } from "react"; import axios from "axios"; +import { Link } from "react-router-dom"; +import PlanCardSkeleton from "./PlanCardSkeleton"; const SubscriptionPlans = () => { const [plans, setPlans] = useState([]); @@ -120,11 +12,10 @@ const SubscriptionPlans = () => { const fetchPlans = async () => { try { setLoading(true); - const res = await axios.get(`http://localhost:5032/api/market/list/subscription-plan?frequency=${frequency}`, { - headers: { - "Content-Type": "application/json" - } - }); + const res = await axios.get( + `http://localhost:5032/api/market/list/subscription-plan?frequency=${frequency}`, + { headers: { "Content-Type": "application/json" } } + ); setPlans(res.data?.data || []); } catch (err) { console.error("Error fetching plans:", err); @@ -137,10 +28,10 @@ const SubscriptionPlans = () => { const frequencyLabel = (freq) => { switch (freq) { - case 0: return "mo"; - case 1: return "3mo"; - case 2: return "6mo"; - case 3: return "yr"; + case 0: return "1 mo"; + case 1: return "3 mo"; + case 2: return "6 mo"; + case 3: return "1 yr"; default: return "mo"; } }; @@ -155,7 +46,7 @@ const SubscriptionPlans = () => { key={idx} type="button" className={`btn btn-${frequency === idx ? "primary" : "outline-secondary"}`} - onClick={() => setFrequency(idx)} // use idx directly (0,1,2,3) + onClick={() => setFrequency(idx)} > {label} @@ -163,73 +54,88 @@ const SubscriptionPlans = () => { - {/* Cards */} -
+
{loading ? ( -
Loading...
+ // Show 3 skeletons + <> + + + + ) : plans.length === 0 ? (
No plans found
) : ( plans.map((plan) => (
-
-
-

{plan.planName}

-

{plan.description}

-
- - {plan.currency?.symbol}{plan.price} - - /{frequencyLabel(frequency)} +
+ {/* Header */} +
+ +

{plan.planName}

+

{plan.description}

+
+ + {/* Price */} +
+

+ {plan.currency?.symbol} {plan.price} + / {frequencyLabel(frequency)} +

+
+ + {/* Storage & Trial */} +
+
+ + Storage {plan.maxStorage} MB
-
- Max Users: {plan.maxUser} | Storage: {plan.maxStorage} MB +
+ + Trial Days {plan.trialDays}
-
-
    - {plan.features?.modules && - Object.values(plan.features.modules).map((modGroup) => - Object.values(modGroup).map((mod) => - mod && mod.name ? ( -
  • - - {mod.name}{" "} - {mod.enabled ? ( - Enabled - ) : ( - Disabled - )} -
  • - ) : null - ) - )} + {/* Features */} +
    + Features +
    +
      + {plan.features?.modules && + Object.values(plan.features.modules).map((mod) => + mod && mod.name ? ( +
    • + {mod.enabled ? ( + + ) : ( + + )} + {mod.name} +
    • + ) : null + )} +
    -
  • - - Support:{" "} - {plan.features?.supports?.prioritySupport - ? "Priority" - : plan.features?.supports?.phoneSupport - ? "Phone & Email" - : "Email Only"} -
  • -
-
- -
- + {/* Button */} +
+ + Request a Demo +
)) )}
+
); }; export default SubscriptionPlans; - diff --git a/src/pages/authentication/LoginPage.jsx b/src/pages/authentication/LoginPage.jsx index db99e6a1..3e331376 100644 --- a/src/pages/authentication/LoginPage.jsx +++ b/src/pages/authentication/LoginPage.jsx @@ -136,7 +136,7 @@ const LoginPage = () => { )}
*/} -
+
@@ -146,7 +146,8 @@ const LoginPage = () => { type={hidepass ? "password" : "text"} autoComplete="new-password" id="password" - className="form-control form-control-xl shadow-none" + className={`form-control form-control-xl shadow-none ${errors.password ? "is-invalid" : "" + }`} name="password" {...register("password")} placeholder="••••••••••••" @@ -155,7 +156,7 @@ const LoginPage = () => {
+ + {/* ✅ Error message */} + {errors.password && ( +
+ {errors.password.message} +
+ )}
+ {/* Remember Me + Forgot Password */}