generate-sitemap [slug] issue solved and & service etobico slug updated
This commit is contained in:
parent
a72120d458
commit
d0f28acc89
@ -1,80 +0,0 @@
|
||||
'use client'
|
||||
|
||||
import Link from "next/link";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function ServiceDetailClient({ slug, service, servicesList }) {
|
||||
const [isActive, setIsActive] = useState({ status: false, key: 1 });
|
||||
|
||||
const handleToggle = (key) => {
|
||||
if (isActive.key === key) {
|
||||
setIsActive({ status: false });
|
||||
} else {
|
||||
setIsActive({ status: true, key });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* service-section */}
|
||||
<section className="service-details pt_90 pb_90">
|
||||
<div className="auto-container">
|
||||
<div className="row clearfix">
|
||||
|
||||
<div className="col-lg-4 col-md-12 col-sm-12 sidebar-side">
|
||||
<div className="default-sidebar service-sidebar mr_15">
|
||||
<div className="sidebar-widget category-widget">
|
||||
<div className="widget-title"><h3>Services</h3></div>
|
||||
<div className="widget-content">
|
||||
<ul className="category-list clearfix">
|
||||
{servicesList.map((item) => (
|
||||
<li key={item.slug}>
|
||||
<Link
|
||||
href={`/etobicoke-treatment-service/${item.slug}`}
|
||||
className={slug === item.slug ? "current" : ""}
|
||||
>
|
||||
{item.shortTitle}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className="service-block-one">
|
||||
|
||||
<div className="inner-box">
|
||||
<div className="image-box">
|
||||
<figure className="image">
|
||||
<img src={service.sidebarImg} alt={service.alt} /></figure>
|
||||
</div>
|
||||
<div className="lower-content">
|
||||
<div className="icon-box">
|
||||
<img
|
||||
src={service.icon}
|
||||
alt={`${service.title} Icon`}
|
||||
/>
|
||||
</div>
|
||||
<h3>{service.shortTitle}</h3>
|
||||
<p>{service.shortDescription}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Content */}
|
||||
<div className="col-lg-8 col-md-12 col-sm-12 content-side">
|
||||
<div className="service-details-content">
|
||||
<div className="content-one mb_60">
|
||||
<figure className="image-box mb_40"><img src={service.bigImg} alt={service.alt} /></figure>
|
||||
|
||||
<div dangerouslySetInnerHTML={{ __html: service.description } || "No description available."} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -1,23 +1,7 @@
|
||||
import Layout from "@/components/layout/Layout";
|
||||
import Link from "next/link";
|
||||
import { notFound } from "next/navigation";
|
||||
import { servicesList } from "@/utils/Services.utils";
|
||||
import ServiceDetailClient from "./ServiceDetailClient";
|
||||
|
||||
export async function generateMetadata({ params }) {
|
||||
const service = servicesList.find((item) => item.slug === params.slug);
|
||||
|
||||
if (!service) {
|
||||
return {
|
||||
title: "Service | MySite",
|
||||
description: "Explore our services",
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
title: service.metaTitle || service.shortTitle || service.title,
|
||||
description: service.metaDiscription || service.shortDesc || "Explore this service in detail",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export async function generateStaticParams() {
|
||||
return servicesList.map((item) => ({
|
||||
@ -25,19 +9,98 @@ export async function generateStaticParams() {
|
||||
}));
|
||||
}
|
||||
|
||||
export default function ServiceDetailPage({ params }) {
|
||||
const { slug } = params;
|
||||
const service = servicesList.find((item) => item.slug === slug);
|
||||
export async function generateMetadata({ params }) {
|
||||
const service = servicesList.find((item) => item.slug === params.slug);
|
||||
|
||||
if (!service) {
|
||||
return <div>Service not found</div>;
|
||||
return {
|
||||
title: "Service Not Found – MySite",
|
||||
description: "The requested service could not be found.",
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
title: `${service.metaTitle || service.shortTitle || service.title} – MySite`,
|
||||
description: service.metaDiscription || service.shortDesc || "Explore our services in detail.",
|
||||
};
|
||||
}
|
||||
|
||||
export default function ServiceDetailPage({ params }) {
|
||||
const service = servicesList.find((item) => item.slug === params.slug);
|
||||
|
||||
if (!service) return notFound();
|
||||
|
||||
const altText = service.title ? service.title.toUpperCase() : "SERVICE";
|
||||
|
||||
return (
|
||||
<Layout headerStyle={1} footerStyle={1}
|
||||
breadcrumbTitle={service.shortTitle}
|
||||
bannerImage={service.bannerImage}>
|
||||
<ServiceDetailClient slug={slug} service={service} servicesList={servicesList} />
|
||||
<Layout
|
||||
headerStyle={1}
|
||||
footerStyle={1}
|
||||
breadcrumbTitle={service.shortTitle}
|
||||
bannerImage={service.bannerImage}
|
||||
>
|
||||
<section className="service-details pt_90 pb_90">
|
||||
<div className="auto-container">
|
||||
<div className="row clearfix">
|
||||
{/* Sidebar */}
|
||||
<div className="col-lg-4 col-md-12 col-sm-12 sidebar-side">
|
||||
<div className="default-sidebar service-sidebar mr_15">
|
||||
{/* Categories */}
|
||||
<div className="sidebar-widget category-widget">
|
||||
<div className="widget-title">
|
||||
<h3>Services</h3>
|
||||
</div>
|
||||
<div className="widget-content">
|
||||
<ul className="category-list clearfix">
|
||||
{servicesList.map((item) => (
|
||||
<li key={item.slug}>
|
||||
<Link
|
||||
href={`/etobicoke-treatment-service/${item.slug}`}
|
||||
className={item.slug === service.slug ? "current" : ""}
|
||||
>
|
||||
{item.shortTitle}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="service-block-one">
|
||||
<div className="inner-box">
|
||||
<div className="image-box">
|
||||
<figure className="image">
|
||||
<img src={service.sidebarImg} alt={altText} />
|
||||
</figure>
|
||||
</div>
|
||||
<div className="lower-content">
|
||||
<div className="icon-box">
|
||||
<img src={service.icon} alt={`${service.title} Icon`} />
|
||||
</div>
|
||||
<h3>{service.shortTitle}</h3>
|
||||
<p>{service.shortDescription}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="col-lg-8 col-md-12 col-sm-12 content-side">
|
||||
<div className="service-details-content">
|
||||
<div className="content-one mb_60">
|
||||
<figure className="image-box mb_40">
|
||||
<img src={service.bigImg} alt={altText} />
|
||||
</figure>
|
||||
<div
|
||||
className="service-details-description"
|
||||
dangerouslySetInnerHTML={{ __html: service.description }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
import Link from "next/link"
|
||||
import Layout from "@/components/layout/Layout"
|
||||
|
||||
export const metadata = {
|
||||
title: "Refugee Physiotherapy at Physiotherapy Etobicoke - Rapharehab Physiotherapy clinic Etobicoke",
|
||||
description:
|
||||
"Explore flexible payment options and insurance coverage at Rapharehab Physiotherapy clinic and rehabilitation etobicoke. We accept a variety of insurance plans and offer convenient payment solutions to ensure you get the care you need without financial stress. Book your appointment today!",
|
||||
};
|
||||
|
||||
|
||||
export default function Refugee() {
|
||||
return (
|
||||
<>
|
||||
<Layout headerStyle={1} footerStyle={1} breadcrumbTitle="Refugee Physiotherapy" bannerImage="/assets/images/payment-insurance/payment-banner.webp">
|
||||
{/* chooseus-section */}
|
||||
<section className="solutions-section">
|
||||
<div className="auto-container">
|
||||
<div className="row clearfix">
|
||||
<div className="col-lg-6 col-md-12 col-sm-12 content-column">
|
||||
<div className="content-box">
|
||||
<div className="sec-title mb_15">
|
||||
{/* <span className="sub-title">Better Solutions</span> */}
|
||||
<h2>Refugee Physiotherapy</h2>
|
||||
</div>
|
||||
<div className="progress-inner mb_50">
|
||||
<p>At rapharehab Etobicoke Physiotherapy clinic, your treatments are partially or fully covered by health insurance plans and Workplace Safety and Insurance Board (WSIB). If you have medical health care coverage, we believe your treatment costs will be covered by health care plans. The treatments such as physiotherapy, massage therapy, chiropractic care, acupuncture, orthotics etc., all can be covered by health care insurance.</p>
|
||||
<ul className="list-style-one clearfix mt-4">
|
||||
<li>In case if you are injured in a motor vehicle accident (MVA), the auto insurance covers the cost of the treatment.</li>
|
||||
<li>Please get in touch with rapharehab Physiotherapy clinic etobicoke for assistance to know about your coverage.</li>
|
||||
<li>We Accept Cash/Cheque/Visa/Direct Payment.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-lg-6 col-md-12 col-sm-12 image-column">
|
||||
<div className="image_block_two">
|
||||
<div className="image-box">
|
||||
<figure className="image image-1-new"><img src="/assets/images/payment-insurance/back.webp" alt="Payment and Insurance" /></figure>
|
||||
<figure className="image image-2-new"><img src="/assets/images/payment-insurance/front.webp" alt="Payment and Insurance" /></figure>
|
||||
<div className="icon-box cart-icon"><img src="/assets/images/payment-insurance/icon.webp" alt="Payment and Insurance" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{/* chooseus-section end */}
|
||||
{/* subscibe */}
|
||||
{/* <section className="subscribe-section">
|
||||
<div className="auto-container">
|
||||
<div className="inner-container">
|
||||
<div className="row align-items-center">
|
||||
<div className="col-lg-6 col-md-12 col-sm-12 text-column">
|
||||
<div className="text-box">
|
||||
<h2><span>Subscribe</span> for the exclusive updates!</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-lg-6 col-md-12 col-sm-12 form-column">
|
||||
<div className="form-inner">
|
||||
<form method="post" action="contact">
|
||||
<div className="form-group">
|
||||
<input type="email" name="email" placeholder="Enter Your Email Address" required />
|
||||
<button type="submit" className="theme-btn btn-one"><span>Subscribe Now</span></button>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<div className="check-box">
|
||||
<input className="check" type="checkbox" id="checkbox1" />
|
||||
<label htmlFor="checkbox1">I agree to the <Link href="index">Privacy Policy.</Link></label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section> */}
|
||||
{/* subscibe end */}
|
||||
</Layout>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@ -43,7 +43,6 @@ export default function Header2({
|
||||
<li><Link href="/faq-physiotherapy-etobicoke">FAQ’s</Link></li>
|
||||
<li><Link href="/what-to-expect">What To Expect</Link></li>
|
||||
<li><Link href="/payment-insurance">Payment And Insurance</Link></li>
|
||||
{/* <li><Link href="/refugee-physiotherapy">Refugee Physiotherapy</Link></li> */}
|
||||
<li>
|
||||
<Link href="https://www.instagram.com/elrapharehab/" target="_blank" rel="noopener noreferrer">
|
||||
<i className="icon-4"></i>
|
||||
|
||||
@ -54,7 +54,6 @@ const staticLinks = [
|
||||
{ url: '/blog/', changefreq: 'weekly', priority: 0.6 },
|
||||
{ url: '/contact/', changefreq: 'weekly', priority: 0.6 },
|
||||
{ url: '/caregivers/', changefreq: 'weekly', priority: 0.6 },
|
||||
{ url: '/gallery-physiotherapy-etobicoke/', changefreq: 'weekly', priority: 0.6 },
|
||||
{ url: '/shortcodes/', changefreq: 'weekly', priority: 0.6 },
|
||||
];
|
||||
|
||||
@ -65,7 +64,7 @@ const blogPosts = [
|
||||
{ slug: '/blog/osteopath-near-me-first-visit-rapha-rehab/' },
|
||||
{ slug: '/blog/strength-training-rehabilitation-rapha-rehab/' },
|
||||
{ slug: '/blog/biceps-triceps-back-workouts-rapha-rehab/' },
|
||||
{ slug: '/beginner-workouts-rehab-wellness-rapha-rehab/' },
|
||||
{ slug: '/blog/beginner-workouts-rehab-wellness-rapha-rehab/' },
|
||||
{ slug: '/blog/recover-strong-post-surgery-rehabilitation-exercises/' },
|
||||
{ slug: '/blog/benefits-massage-therapy-sports-injuries/' },
|
||||
{ slug: '/blog/shockwave-therapy-etobicoke-chronic-pain/' },
|
||||
@ -73,7 +72,7 @@ const blogPosts = [
|
||||
|
||||
// Convert blog slugs to sitemap entries
|
||||
const blogLinks = blogPosts.map(post => ({
|
||||
url: `/${post.slug}`,
|
||||
url: `${post.slug}`,
|
||||
changefreq: 'weekly',
|
||||
priority: 0.6
|
||||
}));
|
||||
@ -122,7 +121,7 @@ const services = [
|
||||
|
||||
// Convert services slugs to sitemap entries
|
||||
const servicesLinks = services.map(post => ({
|
||||
url: `/${post.slug}`,
|
||||
url: `${post.slug}`,
|
||||
changefreq: 'weekly',
|
||||
priority: 0.6
|
||||
}));
|
||||
@ -131,7 +130,7 @@ const servicesLinks = services.map(post => ({
|
||||
// ✅ Dynamic area-of-injury
|
||||
const areas = [
|
||||
{ slug: '/area-of-injury/head-injury-physiotherapy-management-etobicoke/' },
|
||||
{ slug: '/area-of-injury/neck-injury-physiotherapy-management-etobicokeneck-injury-physiotherapy-management-etobicoke/' },
|
||||
{ slug: '/area-of-injury/neck-injury-physiotherapy-management-etobicoke/' },
|
||||
{ slug: '/area-of-injury/shoulder-injury-physiotherapy-management-etobicoke/' },
|
||||
{ slug: '/area-of-injury/elbow-injury-physiotherapy-management-etobicoke/' },
|
||||
{ slug: '/area-of-injury/wristhand-injury-physiotherapy-management-etobicoke/' },
|
||||
@ -143,7 +142,7 @@ const areas = [
|
||||
|
||||
// Convert Areas of Injury slugs to sitemap entries
|
||||
const areasLinks = areas.map(post => ({
|
||||
url: `/${post.slug}`,
|
||||
url: `${post.slug}`,
|
||||
changefreq: 'weekly',
|
||||
priority: 0.6
|
||||
}));
|
||||
@ -159,7 +158,7 @@ const rehabilitation = [
|
||||
|
||||
// Convert Areas of Injury slugs to sitemap entries
|
||||
const rehabilitationLinks = rehabilitation.map(post => ({
|
||||
url: `/${post.slug}`,
|
||||
url: `${post.slug}`,
|
||||
changefreq: 'weekly',
|
||||
priority: 0.6
|
||||
}));
|
||||
@ -178,7 +177,7 @@ const accident = [
|
||||
|
||||
// Convert Accident slugs to sitemap entries
|
||||
const accidentLinks = accident.map(post => ({
|
||||
url: `/${post.slug}`,
|
||||
url: `${post.slug}`,
|
||||
changefreq: 'weekly',
|
||||
priority: 0.6
|
||||
}));
|
||||
@ -193,7 +192,7 @@ const ourteam = [
|
||||
|
||||
// Convert Our Team slugs to sitemap entries
|
||||
const ourteamLinks = ourteam.map(post => ({
|
||||
url: `/${post.slug}`,
|
||||
url: `${post.slug}`,
|
||||
changefreq: 'weekly',
|
||||
priority: 0.6
|
||||
}));
|
||||
|
||||
@ -40,7 +40,7 @@ export const areaOfInjuryData = [
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
slug: "neck-injury-physiotherapy-management-etobicokeneck-injury-physiotherapy-management-etobicoke",
|
||||
slug: "neck-injury-physiotherapy-management-etobicoke",
|
||||
title: "Neck Injuries",
|
||||
shortDescription: "Relieve neck pain, restore flexibility, and strengthen muscles with professional physiotherapy.",
|
||||
image: "/assets/images/areas-of-injury/neck-injury/left.webp",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user