diff --git a/app/blog/[slug]/BlogContent.js b/app/blog/[slug]/BlogContent.js new file mode 100644 index 0000000..2444462 --- /dev/null +++ b/app/blog/[slug]/BlogContent.js @@ -0,0 +1,21 @@ +'use client' +import { useState, useEffect } from "react"; + +export default function BlogContent({ content }) { + const [email, setEmail] = useState(""); + + useEffect(() => { + const user = "bloor"; + const domain = "rapharehab.ca"; + setEmail(`${user}@${domain}`); + }, []); + + const processedContent = content.replace( + 'bloor@rapharehab.ca', + email ? `${email}` : 'Loading...' + ); + + return ( +
+ ); +} \ No newline at end of file diff --git a/app/blog/[slug]/page.js b/app/blog/[slug]/page.js index 20e8b9c..c649b9d 100644 --- a/app/blog/[slug]/page.js +++ b/app/blog/[slug]/page.js @@ -3,6 +3,7 @@ import Link from "next/link"; import Blogs from "@/utils/Blog.utils"; import { notFound } from "next/navigation"; import FaqSection from "@/components/FaqSection"; +import BlogContent from "./BlogContent"; export async function generateStaticParams() { return Blogs.map((item) => ({ @@ -33,7 +34,6 @@ export default function BlogDetails({ params }) { ); const relatedBlogs = sameCategoryBlogs.length > 0 ? [sameCategoryBlogs[0]] : []; - return ( + aria-label="Blog List"> {b.title} @@ -95,7 +95,7 @@ export default function BlogDetails({ params }) { + aria-label="Read More"> Read More
@@ -122,8 +122,8 @@ export default function BlogDetails({ params }) {

{blog.title}

-
- {blog.faq && } + + {blog.faq && }
@@ -134,4 +134,4 @@ export default function BlogDetails({ params }) { ); -} +} \ No newline at end of file diff --git a/app/why-rapha-physiotherapy-etobicoke/WhyusClient.js b/app/why-rapha-physiotherapy-etobicoke/WhyusClient.js index 83e646b..45d2870 100644 --- a/app/why-rapha-physiotherapy-etobicoke/WhyusClient.js +++ b/app/why-rapha-physiotherapy-etobicoke/WhyusClient.js @@ -1,19 +1,25 @@ 'use client'; +import { useState, useEffect } from "react"; import Layout from "@/components/layout/Layout"; import Link from "next/link"; import Image from "next/image"; - - export default function Team() { + const [email, setEmail] = useState(""); + + useEffect(() => { + const user = "bloor"; + const domain = "rapharehab.ca"; + setEmail(`${user}@${domain}`); + }, []); + const teamMembers = [ - // { name: 'Musculoskeletal Physiotherapy', role: 'Medical Assistant', image: 'assets/images/team/team-1.jpg' }, { name: 'Musculoskeletal Physiotherapy', image: '/assets/images/why-us/img/musculo.webp' }, { name: 'Sports Physiotherapy', image: '/assets/images/why-us/img/sports.webp' }, { name: 'Clinical Pilates', image: '/assets/images/why-us/img/clinical-pilates.webp' }, { name: 'Workplace & Occupational', image: '/assets/images/why-us/img/workplace.webp' }, { name: 'Sports Rehabilitation', image: '/assets/images/why-us/img/sports-rehabilation.webp' }, - { name: 'Women’s health', image: '/assets/images/why-us/img/women-health.webp' }, + { name: 'Womens health', image: '/assets/images/why-us/img/women-health.webp' }, { name: 'Back & Neck Pain', image: '/assets/images/why-us/img/back-pain.webp' }, { name: 'Fitness & Exercise Programs', image: '/assets/images/why-us/img/fitness.webp' }, { name: 'Pregnancy and Post-natal', image: '/assets/images/why-us/img/pregnancy.webp' }, @@ -21,13 +27,13 @@ export default function Team() { { name: 'Injury Management', image: '/assets/images/why-us/img/injury.webp' }, { name: 'Pre/Post Surgical Management', image: '/assets/images/why-us/img/surgical.webp' }, ]; + return (
Physiotherapy at Rapharehab Physiotherapy at Rapharehab
- -
- {/*
-
-
-
-
*/}
Why Choose Us @@ -64,12 +62,6 @@ export default function Team() {
{`${member.name}`}
- {/*
    -
  • -
  • -
  • -
  • -
*/}

{member.name}

@@ -83,11 +75,9 @@ export default function Team() {
-
Physiotherapy at Rapharehab
- {/* LEFT IMAGE / RIGHT CONTENT */}
@@ -109,10 +98,6 @@ export default function Team() {
- {/*
- About Us -

Medical services & diagnostics

-
*/}
  • Team of health care professionals – We are a team of health care professionals working together to help get you better, faster. This helps us in rendering our best possible services to our clients.
  • @@ -130,10 +115,8 @@ export default function Team() {
- {/*
*/}
- {/* RIGHT IMAGE / LEFT CONTENT */}
@@ -146,10 +129,6 @@ export default function Team() {
- {/*
- About Us -

Medical services & diagnostics

-
*/}
  • Top-Notch Treatment – Under our care, you will be placed in a supportive and comfortable environment helping you receive care in comfortable and supportive environment designed to address your issues.
  • @@ -169,7 +148,6 @@ export default function Team() {
     Physiotherapy at Rapharehab
    Physiotherapy at Rapharehab
    - {/* */} -

    Rapha rehab offers patients in etobicoke and scarborough exceptional care with a personalized treatment plan to suit your specific needs. If you are suffering from pain or have recently experienced an injury, our etobicoke and scarborough Physiotherapists will ensure you get back to the activities you enjoy and love. Call us at 647-722-3434 for an appointment today or email us at bloor@rapharehab.ca to book a consultation.

    +

    + Rapha rehab offers patients in etobicoke and scarborough exceptional care with a personalized treatment plan to suit your specific needs. If you are suffering from pain or have recently experienced an injury, our etobicoke and scarborough Physiotherapists will ensure you get back to the activities you enjoy and love. Call us at 647-722-3434 for an appointment today or email us at {email ? ( + {email} + ) : ( + Loading... + )} to book a consultation. +

    Make an Appointment
    -
-
); -} +} \ No newline at end of file diff --git a/components/layout/MobileMenu.js b/components/layout/MobileMenu.js index 32cd05d..6e73b69 100644 --- a/components/layout/MobileMenu.js +++ b/components/layout/MobileMenu.js @@ -1,6 +1,6 @@ 'use client' import Link from "next/link"; -import { useState } from "react"; +import { useState, useEffect } from "react"; import { servicesList } from "@/utils/Services.utils"; import { areaOfInjuryData } from "@/utils/AreaOfInjery.utils"; import Rehabilitation from "@/utils/Rehabilitation.utils"; @@ -12,6 +12,14 @@ export default function MobileMenu({ isSidebar, handleMobileMenu, handleSidebar key: "", subMenuKey: "", }); + + const [email, setEmail] = useState(""); + + useEffect(() => { + const user = "bloor"; + const domain = "rapharehab.ca"; + setEmail(`${user}@${domain}`); + }, []); const handleToggle = (key, subMenuKey = "") => { if (isActive.key === key && isActive.subMenuKey === subMenuKey) { @@ -200,9 +208,13 @@ export default function MobileMenu({ isSidebar, handleMobileMenu, handleSidebar
  • - - bloor@rapharehab.ca - + {email ? ( + + {email} + + ) : ( + Loading... + )}
  • @@ -217,4 +229,4 @@ export default function MobileMenu({ isSidebar, handleMobileMenu, handleSidebar /> ); -} +} \ No newline at end of file diff --git a/components/layout/footer/Footer1.js b/components/layout/footer/Footer1.js index e513284..20018c2 100644 --- a/components/layout/footer/Footer1.js +++ b/components/layout/footer/Footer1.js @@ -1,3 +1,5 @@ +"use client" +import { useState, useEffect } from "react" import Link from "next/link" import Rehabilitation from "@/utils/Rehabilitation.utils" import Accident from "@/utils/Accident.utils" @@ -5,6 +7,13 @@ import { areaOfInjuryData } from "@/utils/AreaOfInjery.utils" import { servicesList } from "@/utils/Services.utils" export default function Footer2() { + const [email, setEmail] = useState(""); + + useEffect(() => { + const user = "bloor"; + const domain = "rapharehab.ca"; + setEmail(`${user}@${domain}`); + }, []); const servicesCols = [ servicesList.slice(0, 13), @@ -12,7 +21,6 @@ export default function Footer2() { servicesList.slice(25, 37), ]; - return ( <> ) -} +} \ No newline at end of file diff --git a/components/layout/footer/Footer2.js b/components/layout/footer/Footer2.js index 5759ef6..7bfa70b 100644 --- a/components/layout/footer/Footer2.js +++ b/components/layout/footer/Footer2.js @@ -1,3 +1,5 @@ +"use client" +import { useState, useEffect } from "react" import Link from "next/link" import Rehabilitation from "@/utils/Rehabilitation.utils" import Accident from "@/utils/Accident.utils" @@ -5,6 +7,13 @@ import { areaOfInjuryData } from "@/utils/AreaOfInjery.utils" import { servicesList } from "@/utils/Services.utils" export default function Footer2() { + const [email, setEmail] = useState(""); + + useEffect(() => { + const user = "bloor"; + const domain = "rapharehab.ca"; + setEmail(`${user}@${domain}`); + }, []); const servicesCols = [ servicesList.slice(0, 13), @@ -12,7 +21,6 @@ export default function Footer2() { servicesList.slice(25, 37), ]; - return ( <> ) -} +} \ No newline at end of file diff --git a/components/layout/header/Header1.js b/components/layout/header/Header1.js index 47d66b8..93a1b51 100644 --- a/components/layout/header/Header1.js +++ b/components/layout/header/Header1.js @@ -2,8 +2,18 @@ import Link from "next/link"; import Menu from "../Menu" import MobileMenu from "../MobileMenu" +import { useState, useEffect } from "react"; // Import useState and useEffect export default function Header1({ scroll, isMobileMenu, handleMobileMenu, isSidebar, handlePopup, handleSidebar }) { + const [email, setEmail] = useState(""); + + useEffect(() => { + // Set the email address safely + const user = "bloor"; + const domain = "rapharehab.ca"; + setEmail(`${user}@${domain}`); + }, []); + return ( <>
    @@ -19,7 +29,7 @@ export default function Header1({ scroll, isMobileMenu, handleMobileMenu, isSide style={{ marginRight: "8px" }} className="red-icon" /> - + @@ -34,19 +44,27 @@ export default function Header1({ scroll, isMobileMenu, handleMobileMenu, isSide style={{ marginRight: "8px" }} className="red-icon" /> - + {email ? ( + + + {email} + + + ) : ( - bloor@rapharehab.ca + Loading... - + )}
    ) -} +} \ No newline at end of file diff --git a/components/layout/header/Header2.js b/components/layout/header/Header2.js index fca4009..5848ab1 100644 --- a/components/layout/header/Header2.js +++ b/components/layout/header/Header2.js @@ -14,6 +14,7 @@ export default function Header2({ isHome = false, }) { const [isMobile, setIsMobile] = useState(false); + const [email, setEmail] = useState(""); // ✅ Detect mobile screen useEffect(() => { @@ -23,6 +24,13 @@ export default function Header2({ return () => window.removeEventListener("resize", checkScreenSize); }, []); + // ✅ Set email safely + useEffect(() => { + const user = "bloor"; + const domain = "rapharehab.ca"; + setEmail(`${user}@${domain}`); + }, []); + // ✅ Switch logo based on screen size const logoSrc = isMobile ? "/assets/images/logo-mbl.png" // mobile logo @@ -54,9 +62,17 @@ export default function Header2({ alt="Mail" className="contact-icon" /> - - bloor@rapharehab.ca - + {email ? ( + + + {email} + + + ) : ( + + Loading... + + )} @@ -67,8 +83,8 @@ export default function Header2({
  • - - FAQ’s + + FAQ's
  • @@ -191,4 +207,4 @@ export default function Header2({ ); -} +} \ No newline at end of file