almost change all layouts to ssr
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import AboutUsPage from "@/components/aboutUs";
|
||||
import Layout from "@/components/layout";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
|
||||
function AboutUs() {
|
||||
return (
|
||||
<Layout title="درباره ما" name="about-us">
|
||||
<Layout>
|
||||
<AboutUsPage />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import BlogPage from "@/components/blog";
|
||||
import Layout from "@/components/layout";
|
||||
import articles from "@/data/articles.json";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
|
||||
function Blog({ params: { slug } }) {
|
||||
const article = articles.find((item) => item.id === +slug);
|
||||
|
||||
return (
|
||||
<Layout title="وبلاگ" name="blog">
|
||||
<Layout>
|
||||
<BlogPage article={article} articles={articles} />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import BlogsPage from "@/components/blogs";
|
||||
import Layout from "@/components/layout";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
|
||||
function Blogs() {
|
||||
return (
|
||||
<Layout title="وبلاگ ها" name="blogs">
|
||||
<Layout>
|
||||
<BlogsPage />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import ClinicPage from "@/components/clinic";
|
||||
import Layout from "@/components/layout";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
import clinics from "@/data/clinics.json";
|
||||
import doctors from "@/data/doctors.json";
|
||||
|
||||
@@ -7,7 +7,7 @@ function Blog({ params: { slug } }) {
|
||||
const clinic = clinics.find((item) => item.id === +slug);
|
||||
|
||||
return (
|
||||
<Layout title="کلینیک" name="clinic">
|
||||
<Layout>
|
||||
<ClinicPage data={clinic} doctors={doctors} />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import ClinicsPage from "@/components/clinics";
|
||||
import Layout from "@/components/layout";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
|
||||
function Clinics() {
|
||||
return (
|
||||
<Layout title="کلینیک ها" name="clinics">
|
||||
<Layout>
|
||||
<ClinicsPage />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import ContactUsPage from "@/components/contactUs";
|
||||
import Layout from "@/components/layout";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
|
||||
function ContactUs() {
|
||||
return (
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import DoctorPage from "@/components/doctor";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
import doctors from "@/data/doctors.json";
|
||||
import Layout from "@/components/layout";
|
||||
|
||||
function Doctor({ params: { slug } }) {
|
||||
const doctor = doctors.find((item) => item.id === +slug);
|
||||
|
||||
return (
|
||||
<Layout title="دکتر ها">
|
||||
<Layout>
|
||||
<DoctorPage doctor={doctor} />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import DoctorsPage from "@/components/doctors";
|
||||
import Layout from "@/components/layout";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
|
||||
function Doctors() {
|
||||
return (
|
||||
<Layout title="دکتر ها">
|
||||
<Layout>
|
||||
<DoctorsPage />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
+7
-11
@@ -7,22 +7,18 @@ import { GoogleTagManager } from "@next/third-parties/google";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
import CustomToastify from "./CustomToastify";
|
||||
import { ProvinceProvider } from "@/context/ProvinceProvider";
|
||||
import { headers } from "next/headers";
|
||||
import citiesData from "@/data/city.json";
|
||||
import { getStateInfo } from "@/lib/getStateInfo";
|
||||
|
||||
export async function generateMetadata() {
|
||||
const hostname = headers().get("host") || "";
|
||||
const cityMatch = citiesData.find((city) =>
|
||||
hostname.includes(city.domain.split(".")[0])
|
||||
);
|
||||
const { matchedCity } = getStateInfo();
|
||||
|
||||
return {
|
||||
title: cityMatch ? cityMatch.title : "نوبت724",
|
||||
description: cityMatch
|
||||
? cityMatch.description
|
||||
title: matchedCity ? matchedCity.title : "نوبت724",
|
||||
description: matchedCity
|
||||
? matchedCity.description
|
||||
: "نوبت 724 - سیستم آنلاین نوبتدهی برای پزشکان و کلینیکها. با استفاده از نوبت 724، به راحتی نوبت پزشکی خود را به صورت آنلاین رزرو کنید و از خدمات سریع و کارآمد ما بهرهمند شوید",
|
||||
keywords: cityMatch
|
||||
? cityMatch.keywords
|
||||
keywords: matchedCity
|
||||
? matchedCity.keywords
|
||||
: "نوبت 724, نوبت دهی, رزرو نوبت, پزشک, پزشکی, کلینیک, بیمارستان, نوبت آنلاین, سیستم نوبت دهی, سیستم نوبت دهی آنلاین, سیستم نوبت دهی پزشکی, سیستم نوبت دهی کلینیک, سیستم نوبت دهی بیمارستان, سیستم نوبت دهی آنلاین پزشکی, سیستم نوبت دهی آنلاین کلینیک, سیستم نوبت دهی آنلاین بیمارستان",
|
||||
openGraph: {
|
||||
images: ["https://www.nobat724.com/assets/images/logo.png"],
|
||||
|
||||
+2
-3
@@ -1,10 +1,9 @@
|
||||
import HomePage from "@/components/home";
|
||||
import Layout from "@/components/layout";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
|
||||
export default function Home() {
|
||||
|
||||
return (
|
||||
<Layout title="خانه" name="">
|
||||
<Layout>
|
||||
<HomePage />
|
||||
</Layout>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Layout from "@/components/layout";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
import SpecialtiesPage from "@/components/specialties";
|
||||
|
||||
function Specialties() {
|
||||
|
||||
Reference in New Issue
Block a user