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 React from "react";
function Head() {
const { matchedCity } = getStateInfo();
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]">
<Image
@@ -11,7 +14,7 @@ function Head() {
alt="logo"
/>
<p className="text-[#FAFAFA] text-[16px] sm:text-[18px] md:text-[22px] lg:text-[24px] font-bold">
درباره نوبت ۷۲۴
درباره {matchedCity?.site_name}
</p>
</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);
return (
@@ -10,7 +10,7 @@ function ContentContact({ text, children, url }) {
{children}
</div>
<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>
</li>
);
+5 -8
View File
@@ -1,19 +1,16 @@
import Links from "./Links";
function Call({ isDefault }) {
function Call({ matchedCity, isDefault }) {
return (
<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]
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] leading-[26px] text-[14px] md:text-[16px] font-normal mt-6">
سامانه نوبت 724 به مردم کمک می کند تا دسترسی آسان تر و سریع تری به خدمات
پزشکی و درمانی داشته باشند.
</p>
<Links />
<p className="text-[#FAFAFA] leading-[26px] text-[14px] md:text-[16px] font-normal mt-6">{matchedCity.footerDescription}</p>
<Links matchedCity={matchedCity} />
</div>
);
}
+6 -4
View File
@@ -5,21 +5,23 @@ import EmailC from "../../icons/EmailC";
import WhatsappC from "../../icons/WhatsappC";
import ContentContact from "../ContentContact";
function Links() {
function Links({ matchedCity }) {
return (
<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 />
</ContentContact>
<ContentContact
url="https://wa.me/09124568794"
text="واتساپ: ۰۹۱۲۴۵۶۸۷۹۴"
text={matchedCity.socialMedia.whatsapp}
label='واتساپ: '
>
<WhatsappC />
</ContentContact>
<ContentContact
url="mailto:batome@gmail.com"
text="ایمیل: batome@gmail.com"
text={matchedCity.email}
label='ایمیل: '
>
<EmailC />
</ContentContact>
+2 -3
View File
@@ -5,12 +5,11 @@ import Connect from "./Connect";
function ContactUsPage() {
const { matchedCity } = getStateInfo();
const isDefault = matchedCity?.id === "63";
console.log(isDefault);
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">
<Call isDefault={isDefault} />
{isDefault && (
<Call matchedCity={matchedCity} isDefault={isDefault} />
{matchedCity?.id === "63" && (
<Connect />
)}
</div>
+1 -1
View File
@@ -66,7 +66,7 @@ function Footer({ matchedCity }) {
{/* Right */}
<div className="w-full lg:w-fit flex gap-[12px] lg:gap-[30px] flex-col items-start">
{/* Icon */}
<Logo />
<Logo matchedCity={matchedCity} />
<p className="w-full lg:w-fit lg:max-w-[260px] text-[#616161] text-[14px] font-normal">
{matchedCity?.footerDescription}
</p>