handle data and change design page about-us and contact-us

This commit is contained in:
Ehsan
2025-05-12 22:33:18 +03:30
parent 51396dc02b
commit 405c66d100
7 changed files with 52 additions and 19 deletions
+4 -1
View File
@@ -1,7 +1,10 @@
import { getStateInfo } from "@/lib/getStateInfo";
import Image from "next/image"; import Image from "next/image";
import React from "react"; import React from "react";
function Head() { function Head() {
const { matchedCity } = getStateInfo();
return ( return (
<div className="bg-[#5559C2] rounded-none md:rounded-lg w-full py-[24px] flex flex-col items-center justify-center gap-[13px] md:gap-[16px]"> <div className="bg-[#5559C2] rounded-none md:rounded-lg w-full py-[24px] flex flex-col items-center justify-center gap-[13px] md:gap-[16px]">
<Image <Image
@@ -11,7 +14,7 @@ function Head() {
alt="logo" alt="logo"
/> />
<p className="text-[#FAFAFA] text-[16px] sm:text-[18px] md:text-[22px] lg:text-[24px] font-bold"> <p className="text-[#FAFAFA] text-[16px] sm:text-[18px] md:text-[22px] lg:text-[24px] font-bold">
درباره نوبت ۷۲۴ درباره {matchedCity?.site_name}
</p> </p>
</div> </div>
); );
+2 -2
View File
@@ -1,4 +1,4 @@
function ContentContact({ text, children, url }) { function ContentContact({ text, children, url, label }) {
const openURL = (url) => window.open(url); const openURL = (url) => window.open(url);
return ( return (
@@ -10,7 +10,7 @@ function ContentContact({ text, children, url }) {
{children} {children}
</div> </div>
<p className="text-[#FFF] text-[14px] md:text-[18px] sm:text-[16px] lg:text-[20px] font-normal"> <p className="text-[#FFF] text-[14px] md:text-[18px] sm:text-[16px] lg:text-[20px] font-normal">
{text} {label}<span dir="ltr">{text}</span>
</p> </p>
</li> </li>
); );
+5 -8
View File
@@ -1,19 +1,16 @@
import Links from "./Links"; import Links from "./Links";
function Call({ isDefault }) { function Call({ matchedCity, isDefault }) {
return ( return (
<div <div
className={`lg:min-w-[calc(50%_+_70px)] bg-banner-about !bg-center !bg-no-repeat !bg-cover lg:pl-[18%] h-fit pt-[16px] sm:pt-[29px] md:pt-[42px] lg:pt-[55px] className={`lg:min-w-[calc(50%_+_70px)] bg-banner-about !bg-center !bg-no-repeat !bg-cover h-fit pt-[16px] sm:pt-[29px] md:pt-[42px] lg:pt-[55px]
bg-contact rounded-[8px] pb-[30px] sm:pb-[42px] md:pb-[55px] bg-contact rounded-[8px] pb-[30px] sm:pb-[42px] md:pb-[55px]
overflow-hidden lg:pb-[171px] px-[16px] sm:px-[27px] md:px-[39px] lg:px-[48px] overflow-hidden lg:pb-[171px] px-[16px] sm:px-[27px] md:px-[39px] lg:px-[48px]
${!isDefault && 'w-full'}`} ${isDefault ? 'lg:pl-[18%]' : 'w-full'}`}
> >
<p className="text-[#FAFAFA] text-[20px] font-bold">تماس با ما</p> <p className="text-[#FAFAFA] text-[20px] font-bold">تماس با ما</p>
<p className="text-[#FAFAFA] leading-[26px] text-[14px] md:text-[16px] font-normal mt-6"> <p className="text-[#FAFAFA] leading-[26px] text-[14px] md:text-[16px] font-normal mt-6">{matchedCity.footerDescription}</p>
سامانه نوبت 724 به مردم کمک می کند تا دسترسی آسان تر و سریع تری به خدمات <Links matchedCity={matchedCity} />
پزشکی و درمانی داشته باشند.
</p>
<Links />
</div> </div>
); );
} }
+6 -4
View File
@@ -5,21 +5,23 @@ import EmailC from "../../icons/EmailC";
import WhatsappC from "../../icons/WhatsappC"; import WhatsappC from "../../icons/WhatsappC";
import ContentContact from "../ContentContact"; import ContentContact from "../ContentContact";
function Links() { function Links({ matchedCity }) {
return ( return (
<ul className="flex flex-col mt-[68px] justify-start items-start gap-[32px]"> <ul className="flex flex-col mt-[68px] justify-start items-start gap-[32px]">
<ContentContact url="tel:900300400" text="تلفن تماس: ۰۲۱۳۶۳۵۴۵۹۸"> <ContentContact url="tel:900300400" label='تلفن تماس: ' text={matchedCity.contactPhone}>
<CallC /> <CallC />
</ContentContact> </ContentContact>
<ContentContact <ContentContact
url="https://wa.me/09124568794" url="https://wa.me/09124568794"
text="واتساپ: ۰۹۱۲۴۵۶۸۷۹۴" text={matchedCity.socialMedia.whatsapp}
label='واتساپ: '
> >
<WhatsappC /> <WhatsappC />
</ContentContact> </ContentContact>
<ContentContact <ContentContact
url="mailto:batome@gmail.com" url="mailto:batome@gmail.com"
text="ایمیل: batome@gmail.com" text={matchedCity.email}
label='ایمیل: '
> >
<EmailC /> <EmailC />
</ContentContact> </ContentContact>
+2 -3
View File
@@ -5,12 +5,11 @@ import Connect from "./Connect";
function ContactUsPage() { function ContactUsPage() {
const { matchedCity } = getStateInfo(); const { matchedCity } = getStateInfo();
const isDefault = matchedCity?.id === "63"; const isDefault = matchedCity?.id === "63";
console.log(isDefault);
return ( return (
<div className="w-full pt-[24px] sm:pt-[56px] md:pt-[88px] lg:pt-[120px] mt-[56px] padding-responsive flex flex-col lg:flex-row items-center justify-between h-fit"> <div className="w-full pt-[24px] sm:pt-[56px] md:pt-[88px] lg:pt-[120px] mt-[56px] padding-responsive flex flex-col lg:flex-row items-center justify-between h-fit">
<Call isDefault={isDefault} /> <Call matchedCity={matchedCity} isDefault={isDefault} />
{isDefault && ( {matchedCity?.id === "63" && (
<Connect /> <Connect />
)} )}
</div> </div>
+1 -1
View File
@@ -66,7 +66,7 @@ function Footer({ matchedCity }) {
{/* Right */} {/* Right */}
<div className="w-full lg:w-fit flex gap-[12px] lg:gap-[30px] flex-col items-start"> <div className="w-full lg:w-fit flex gap-[12px] lg:gap-[30px] flex-col items-start">
{/* Icon */} {/* Icon */}
<Logo /> <Logo matchedCity={matchedCity} />
<p className="w-full lg:w-fit lg:max-w-[260px] text-[#616161] text-[14px] font-normal"> <p className="w-full lg:w-fit lg:max-w-[260px] text-[#616161] text-[14px] font-normal">
{matchedCity?.footerDescription} {matchedCity?.footerDescription}
</p> </p>
+32
View File
@@ -1,6 +1,7 @@
[ [
{ {
"id": "32", "id": "32",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "1", "province_id": "1",
"name": "تبریز", "name": "تبریز",
@@ -21,6 +22,7 @@
}, },
{ {
"id": "33", "id": "33",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "2", "province_id": "2",
"name": "ارومیه", "name": "ارومیه",
@@ -41,6 +43,7 @@
}, },
{ {
"id": "34", "id": "34",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "3", "province_id": "3",
"name": "اردبیل", "name": "اردبیل",
@@ -61,6 +64,7 @@
}, },
{ {
"id": "35", "id": "35",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "4", "province_id": "4",
"name": "اصفهان", "name": "اصفهان",
@@ -81,6 +85,7 @@
}, },
{ {
"id": "36", "id": "36",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "5", "province_id": "5",
"name": "کرج", "name": "کرج",
@@ -101,6 +106,7 @@
}, },
{ {
"id": "37", "id": "37",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "6", "province_id": "6",
"name": "ایلام", "name": "ایلام",
@@ -121,6 +127,7 @@
}, },
{ {
"id": "38", "id": "38",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "7", "province_id": "7",
"name": "بوشهر", "name": "بوشهر",
@@ -141,6 +148,7 @@
}, },
{ {
"id": "39", "id": "39",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "8", "province_id": "8",
"name": "تهران", "name": "تهران",
@@ -161,6 +169,7 @@
}, },
{ {
"id": "40", "id": "40",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "9", "province_id": "9",
"name": "شهرکرد", "name": "شهرکرد",
@@ -181,6 +190,7 @@
}, },
{ {
"id": "41", "id": "41",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "10", "province_id": "10",
"name": "بیرجند", "name": "بیرجند",
@@ -201,6 +211,7 @@
}, },
{ {
"id": "42", "id": "42",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "11", "province_id": "11",
"name": "مشهد", "name": "مشهد",
@@ -221,6 +232,7 @@
}, },
{ {
"id": "43", "id": "43",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "12", "province_id": "12",
"name": "بجنورد", "name": "بجنورد",
@@ -241,6 +253,7 @@
}, },
{ {
"id": "44", "id": "44",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "13", "province_id": "13",
"name": "اهواز", "name": "اهواز",
@@ -261,6 +274,7 @@
}, },
{ {
"id": "45", "id": "45",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "14", "province_id": "14",
"name": "زنجان", "name": "زنجان",
@@ -281,6 +295,7 @@
}, },
{ {
"id": "46", "id": "46",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "15", "province_id": "15",
"name": "سمنان", "name": "سمنان",
@@ -301,6 +316,7 @@
}, },
{ {
"id": "47", "id": "47",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "16", "province_id": "16",
"name": "زاهدان", "name": "زاهدان",
@@ -321,6 +337,7 @@
}, },
{ {
"id": "48", "id": "48",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "17", "province_id": "17",
"name": "شیراز", "name": "شیراز",
@@ -341,6 +358,7 @@
}, },
{ {
"id": "49", "id": "49",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "18", "province_id": "18",
"name": "قزوین", "name": "قزوین",
@@ -361,6 +379,7 @@
}, },
{ {
"id": "50", "id": "50",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "19", "province_id": "19",
"name": "قم", "name": "قم",
@@ -381,6 +400,7 @@
}, },
{ {
"id": "51", "id": "51",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "20", "province_id": "20",
"name": "سنندج", "name": "سنندج",
@@ -401,6 +421,7 @@
}, },
{ {
"id": "52", "id": "52",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "21", "province_id": "21",
"name": "کرمان", "name": "کرمان",
@@ -421,6 +442,7 @@
}, },
{ {
"id": "53", "id": "53",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "22", "province_id": "22",
"name": "کرمانشاه", "name": "کرمانشاه",
@@ -441,6 +463,7 @@
}, },
{ {
"id": "54", "id": "54",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "23", "province_id": "23",
"name": "یاسوج", "name": "یاسوج",
@@ -461,6 +484,7 @@
}, },
{ {
"id": "55", "id": "55",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "24", "province_id": "24",
"name": "گرگان", "name": "گرگان",
@@ -481,6 +505,7 @@
}, },
{ {
"id": "56", "id": "56",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "25", "province_id": "25",
"name": "رشت", "name": "رشت",
@@ -501,6 +526,7 @@
}, },
{ {
"id": "57", "id": "57",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "26", "province_id": "26",
"name": "خرم‌آباد", "name": "خرم‌آباد",
@@ -521,6 +547,7 @@
}, },
{ {
"id": "58", "id": "58",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "27", "province_id": "27",
"name": "ساری", "name": "ساری",
@@ -541,6 +568,7 @@
}, },
{ {
"id": "59", "id": "59",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "28", "province_id": "28",
"name": "اراک", "name": "اراک",
@@ -561,6 +589,7 @@
}, },
{ {
"id": "60", "id": "60",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "29", "province_id": "29",
"name": "بندرعباس", "name": "بندرعباس",
@@ -581,6 +610,7 @@
}, },
{ {
"id": "61", "id": "61",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "30", "province_id": "30",
"name": "همدان", "name": "همدان",
@@ -601,6 +631,7 @@
}, },
{ {
"id": "62", "id": "62",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "31", "province_id": "31",
"name": "یزد", "name": "یزد",
@@ -621,6 +652,7 @@
}, },
{ {
"id": "63", "id": "63",
"email": "nobat724@gmail.com",
"type": "2", "type": "2",
"province_id": "32", "province_id": "32",
"name": "", "name": "",