From 6c5c92c9d9fb96f70c3eb64bf1ba33af311b549c Mon Sep 17 00:00:00 2001 From: LNHA Date: Tue, 3 Feb 2026 14:53:10 +0700 Subject: [PATCH] feat: add pricing page with API integration and dynamic rendering --- app/appointment/page.tsx | 56 +----- app/appointment/types.ts | 30 ++++ app/contact/page.tsx | 60 +------ app/contact/types.ts | 44 +++++ app/layout.tsx | 8 +- app/pricing/page.tsx | 364 ++++++++++++++------------------------- app/pricing/types.ts | 65 +++++++ 7 files changed, 282 insertions(+), 345 deletions(-) create mode 100644 app/appointment/types.ts create mode 100644 app/contact/types.ts create mode 100644 app/pricing/types.ts diff --git a/app/appointment/page.tsx b/app/appointment/page.tsx index aa24873..084edcb 100644 --- a/app/appointment/page.tsx +++ b/app/appointment/page.tsx @@ -1,38 +1,9 @@ "use client"; import { useState, useEffect, FormEvent } from "react"; +import { AppointmentData } from "./types"; +import Breadcrumb from "../components/Breadcrumb"; -// Types for appointment data from CMS -interface AppointmentHero { - title: string; - backgroundImage: string; - subtitle: string; - heading: string; - description: string; -} - -interface AppointmentForm { - heading: string; - fields: Array<{ - name: string; - label: string; - type: string; - placeholder: string; - required: boolean; - colClass: string; - }>; - submitButton: { - text: string; - icon: string; - buttonClass: string; - }; -} - -interface AppointmentData { - hero: AppointmentHero; - visaOptions: string[]; - form: AppointmentForm; -} export default function AppointmentPage() { const [appointmentData, setAppointmentData] = useState(null); @@ -256,28 +227,7 @@ export default function AppointmentPage() { return ( <> {/* Breadcrumb-Wrapper Section Start */} -
-
- img -
-
-
-

{hero.title}

-
    -
  • - Home -
  • -
  • - -
  • -
  • {hero.title}
  • -
-
-
-
+ {/* Appointment Section Start */}
diff --git a/app/appointment/types.ts b/app/appointment/types.ts new file mode 100644 index 0000000..1218aed --- /dev/null +++ b/app/appointment/types.ts @@ -0,0 +1,30 @@ +export interface AppointmentHero { + title: string; + backgroundImage: string; + subtitle: string; + heading: string; + description: string; +} + +export interface AppointmentForm { + heading: string; + fields: Array<{ + name: string; + label: string; + type: string; + placeholder: string; + required: boolean; + colClass: string; + }>; + submitButton: { + text: string; + icon: string; + buttonClass: string; + }; +} + +export interface AppointmentData { + hero: AppointmentHero; + visaOptions: string[]; + form: AppointmentForm; +} diff --git a/app/contact/page.tsx b/app/contact/page.tsx index 0cf7719..cd1f004 100644 --- a/app/contact/page.tsx +++ b/app/contact/page.tsx @@ -1,41 +1,8 @@ "use client"; import { useState, useEffect, FormEvent } from "react"; - -interface ContactCard { - type: string; - title: string; - content: string[]; - iconType: string; -} - -interface ContactData { - hero: { - title: string; - backgroundImage: string; - }; - contactCards: ContactCard[]; - map: { - embedUrl: string; - }; - form: { - heading: string; - description: string; - fields: { - name: string; - label: string; - type: string; - placeholder: string; - required: boolean; - colClass: string; - }[]; - submitButton: { - text: string; - icon: string; - buttonClass: string; - }; - }; -} +import { ContactData } from "./types"; +import Breadcrumb from "../components/Breadcrumb"; export default function ContactPage() { const [contactData, setContactData] = useState(null); @@ -150,28 +117,7 @@ export default function ContactPage() { return ( <> {/* Breadcrumb-Wrapper Section Start */} -
-
- img -
-
-
-

{hero.title}

-
    -
  • - Home -
  • -
  • - -
  • -
  • Contact Us
  • -
-
-
-
+ {/* Contact Icon Section Start */}
diff --git a/app/contact/types.ts b/app/contact/types.ts new file mode 100644 index 0000000..8bdffd5 --- /dev/null +++ b/app/contact/types.ts @@ -0,0 +1,44 @@ +export interface ContactCard { + type: string; + title: string; + content: string[]; + iconType: string; +} + +export interface ContactHero { + title: string; + backgroundImage: string; +} + +export interface ContactMap { + embedUrl: string; +} + +export interface ContactFormField { + name: string; + label: string; + type: string; + placeholder: string; + required: boolean; + colClass: string; +} + +export interface ContactSubmitButton { + text: string; + icon: string; + buttonClass: string; +} + +export interface ContactForm { + heading: string; + description: string; + fields: ContactFormField[]; + submitButton: ContactSubmitButton; +} + +export interface ContactData { + hero: ContactHero; + contactCards: ContactCard[]; + map: ContactMap; + form: ContactForm; +} diff --git a/app/layout.tsx b/app/layout.tsx index d330d31..90b66bf 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,8 +2,8 @@ import type { Metadata } from "next"; import "./globals.css"; -import Header from "./components/Header"; -import Footer from "./components/Footer"; +// import Header from "./components/Header"; +// import Footer from "./components/Footer"; import Loader from "./components/Loader"; import BackToTop from "./components/BackToTop"; import MouseCursor from "./components/MouseCursor"; @@ -48,11 +48,11 @@ export default function RootLayout({ -
+ {/*
*/} {children} -