From a75724b2b1f3aaab725ae15d2a7d056cf27a8114 Mon Sep 17 00:00:00 2001 From: akash Date: Thu, 20 Nov 2025 18:28:04 +0530 Subject: [PATCH] cononical url dynamicly updated --- app/layout.js | 21 ++++++++++++--------- utils/Services.utils.js | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/layout.js b/app/layout.js index 81ace67..20f0634 100644 --- a/app/layout.js +++ b/app/layout.js @@ -1,3 +1,4 @@ +"use client"; import { poppins } from "@/lib/font"; import "@/node_modules/react-modal-video/css/modal-video.css"; import "../public/assets/css/bootstrap.css"; @@ -7,21 +8,23 @@ import "swiper/css"; import "swiper/css/pagination"; import "swiper/css/free-mode"; import Script from "next/script"; - -export const metadata = { - title: "Best Pain Relief & Physiotherapy - Repharehab Clinic", - description: - "Rapharehab offers trusted physiotherapy and pain relief treatments with professional care tailored to restore your health and mobility.", -}; +import { usePathname } from "next/navigation"; export default function RootLayout({ children }) { + const pathname = usePathname(); const siteUrl = "https://rapharehab.ca"; + const canonicalUrl = `${siteUrl}${pathname}`; const logoUrl = `${siteUrl}/assets/images/logo.png`; const ogImage = `${siteUrl}/assets/images/logo.jpg`; + const pageTitle = "Best Pain Relief & Physiotherapy - Repharehab Clinic"; + const pageDescription = "Rapharehab offers trusted physiotherapy and pain relief treatments with professional care tailored to restore your health and mobility."; + return ( + {pageTitle} + {/* ✅ Preload critical font */} {/* */} {/* ✅ Canonical Tag */} - + {/* ✅ Open Graph Meta */} @@ -41,7 +44,7 @@ export default function RootLayout({ children }) { content="Trusted physiotherapy, pain relief and rehab clinic in Etobicoke. Book your appointment now." /> - + @@ -84,7 +87,7 @@ export default function RootLayout({ children }) { {JSON.stringify({ "@context": "https://schema.org", "@type": "PhysiotherapyClinic", - name: "Repharehab Clinic", + name: "Rapharehab Clinic", image: logoUrl, "@id": siteUrl, url: siteUrl, diff --git a/utils/Services.utils.js b/utils/Services.utils.js index d7bb508..b9cb26e 100644 --- a/utils/Services.utils.js +++ b/utils/Services.utils.js @@ -1789,7 +1789,7 @@ export const servicesList = [ "description": `

Chronic Pain Management in Etobicoke

-

Reduce Pain • Improve Function • Live Comfortably

+

Reduce Pain • Improve Function • Live Comfortably

Chronic pain management at Rapha Rehab, Etobicoke, focuses on helping individuals who experience long-lasting pain that affects daily activities, mobility, and overall well-being. Our multidisciplinary team uses evidence-based treatments to manage pain, restore movement, and improve quality of life — even for long-standing or complex conditions.

Whether your pain is from injury, arthritis, nerve issues, posture, or chronic illness, we create a personalized plan to help you move better and feel better.

What is Chronic Pain Management?