Skip to content

Commit 46e9495

Browse files
fix: rename SEO component to Seo for PascalCase compliance (#58)
1 parent 50b6b0e commit 46e9495

8 files changed

Lines changed: 29 additions & 29 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from "prop-types";
22

3-
const SEO = ({
3+
const Seo = ({
44
title,
55
description,
66
keywords,
@@ -51,7 +51,7 @@ const SEO = ({
5151
);
5252
};
5353

54-
SEO.propTypes = {
54+
Seo.propTypes = {
5555
title: PropTypes.string,
5656
description: PropTypes.string,
5757
keywords: PropTypes.string,
@@ -60,5 +60,5 @@ SEO.propTypes = {
6060
ogType: PropTypes.string,
6161
};
6262

63-
export { SEO };
64-
export default SEO;
63+
export { Seo };
64+
export default Seo;
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
import { render } from "@testing-library/react";
22
import { describe, it, expect } from "vitest";
3-
import { SEO } from "./SEO";
3+
import { Seo } from "./Seo";
44

5-
describe("SEO", () => {
5+
describe("Seo", () => {
66
it("renders title with site name", () => {
7-
render(<SEO title="Contactos" />);
7+
render(<Seo title="Contactos" />);
88
expect(document.title).toBe("Contactos | Chrisert");
99
});
1010

1111
it("renders default title when no title prop provided", () => {
12-
render(<SEO />);
12+
render(<Seo />);
1313
expect(document.title).toBe(
1414
"Chrisert - Especialistas em ETICS e Isolamento Térmico"
1515
);
1616
});
1717

1818
it("renders meta description", () => {
19-
render(<SEO description="Descrição personalizada" />);
19+
render(<Seo description="Descrição personalizada" />);
2020
const metaDescription = document.querySelector('meta[name="description"]');
2121
expect(metaDescription).toHaveAttribute("content", "Descrição personalizada");
2222
});
2323

2424
it("renders default description when not provided", () => {
25-
render(<SEO />);
25+
render(<Seo />);
2626
const metaDescription = document.querySelector('meta[name="description"]');
2727
expect(metaDescription?.getAttribute("content")).toContain("ETICS");
2828
});
2929

3030
it("renders meta keywords", () => {
31-
render(<SEO keywords="isolamento, capoto" />);
31+
render(<Seo keywords="isolamento, capoto" />);
3232
const metaKeywords = document.querySelector('meta[name="keywords"]');
3333
expect(metaKeywords).toHaveAttribute("content", "isolamento, capoto");
3434
});
3535

3636
it("renders canonical URL with base URL", () => {
37-
render(<SEO canonical="/contactos" />);
37+
render(<Seo canonical="/contactos" />);
3838
const canonicalLink = document.querySelector('link[rel="canonical"]');
3939
expect(canonicalLink).toHaveAttribute(
4040
"href",
@@ -43,14 +43,14 @@ describe("SEO", () => {
4343
});
4444

4545
it("renders default canonical URL when not provided", () => {
46-
render(<SEO />);
46+
render(<Seo />);
4747
const canonicalLink = document.querySelector('link[rel="canonical"]');
4848
expect(canonicalLink).toHaveAttribute("href", "https://chrisert.pt");
4949
});
5050

5151
it("renders Open Graph meta tags", () => {
5252
render(
53-
<SEO
53+
<Seo
5454
title="Portfolio"
5555
description="Os nossos trabalhos"
5656
canonical="/portfolio"
@@ -73,19 +73,19 @@ describe("SEO", () => {
7373
});
7474

7575
it("renders custom ogType", () => {
76-
render(<SEO ogType="article" />);
76+
render(<Seo ogType="article" />);
7777
const ogType = document.querySelector('meta[property="og:type"]');
7878
expect(ogType).toHaveAttribute("content", "article");
7979
});
8080

8181
it("renders custom ogImage", () => {
82-
render(<SEO ogImage="https://example.com/image.jpg" />);
82+
render(<Seo ogImage="https://example.com/image.jpg" />);
8383
const ogImage = document.querySelector('meta[property="og:image"]');
8484
expect(ogImage).toHaveAttribute("content", "https://example.com/image.jpg");
8585
});
8686

8787
it("renders Twitter meta tags", () => {
88-
render(<SEO title="FAQ" description="Perguntas frequentes" />);
88+
render(<Seo title="FAQ" description="Perguntas frequentes" />);
8989

9090
const twitterCard = document.querySelector('meta[name="twitter:card"]');
9191
const twitterTitle = document.querySelector('meta[name="twitter:title"]');

src/pages/ContactPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Button } from "@/components/ui/Button";
66
import { Input } from "@/components/ui/Input";
77
import { Textarea } from "@/components/ui/Textarea";
88
import ContactErrorDialog from "@/components/contact/ContactErrorDialog";
9-
import { SEO } from "@/components/common/SEO";
9+
import { Seo } from "@/components/common/Seo";
1010
import {
1111
Form,
1212
FormControl,
@@ -78,7 +78,7 @@ const ContactPage = () => {
7878

7979
return (
8080
<div className="container mx-auto px-4 py-10">
81-
<SEO
81+
<Seo
8282
title="Contactos"
8383
description="Entre em contacto com a Chrisert para orçamentos gratuitos de isolamento térmico e obras em fachadas."
8484
canonical="/contactos"

src/pages/FAQPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import {
55
AccordionItem,
66
AccordionTrigger,
77
} from "@/components/ui/accordion";
8-
import { SEO } from "@/components/common/SEO";
8+
import { Seo } from "@/components/common/Seo";
99
import { faqCategories, mythsAndFacts } from "@/data/faqData";
1010

1111
const FAQPage = () => {
1212
return (
1313
<div className="flex flex-col">
14-
<SEO
14+
<Seo
1515
title="Perguntas Frequentes"
1616
description="Dúvidas sobre ETICS ou Capoto? Encontre respostas para as perguntas mais comuns sobre isolamento térmico."
1717
canonical="/faq"

src/pages/HomePage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { Link } from "react-router-dom";
22
import { Button } from "@/components/ui/Button";
33
import { Badge } from "@/components/ui/Badge";
44
import { CTASection } from "@/components/common/CTASection";
5-
import { SEO } from "@/components/common/SEO";
5+
import { Seo } from "@/components/common/Seo";
66
import { Award, Users, ThermometerSun } from "lucide-react";
77

88
const heroImage = new URL("/hero-work.jpg", import.meta.url).href;
99

1010
const HomePage = () => {
1111
return (
1212
<div className="flex flex-col">
13-
<SEO canonical="/" />
13+
<Seo canonical="/" />
1414
<section className="relative min-h-[90vh] flex items-center">
1515
<div
1616
className="absolute inset-0 bg-cover bg-center bg-no-repeat"

src/pages/NotFoundPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Link } from "react-router-dom";
22
import { Button } from "@/components/ui/Button";
33
import { BarsScaleFadeIcon } from "@/components/ui/icons/BarsScaleFadeIcon";
4-
import { SEO } from "@/components/common/SEO";
4+
import { Seo } from "@/components/common/Seo";
55
import { useEffect, useState } from "react";
66

77
const NotFoundPage = () => {
@@ -23,7 +23,7 @@ const NotFoundPage = () => {
2323

2424
return (
2525
<div className="min-h-[80vh] flex items-center justify-center px-4">
26-
<SEO
26+
<Seo
2727
title="Página Não Encontrada"
2828
description="A página que procura não existe."
2929
/>

src/pages/PortfolioPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { CTASection } from "@/components/common/CTASection";
1010
import Lightbox from "@/components/ui/Lightbox";
1111
import SocialLinks from "@/components/common/SocialLinks";
12-
import { SEO } from "@/components/common/SEO";
12+
import { Seo } from "@/components/common/Seo";
1313
import { portfolioImages } from "@/data/portfolioImages";
1414

1515
const PortfolioPage = () => {
@@ -46,7 +46,7 @@ const PortfolioPage = () => {
4646

4747
return (
4848
<div className="flex flex-col">
49-
<SEO
49+
<Seo
5050
title="Portfólio"
5151
description="Veja alguns dos nossos projetos de isolamento térmico e renovação de fachadas realizados em Portugal."
5252
canonical="/portfolio"

src/pages/ServicesPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { CTASection } from "@/components/common/CTASection";
2-
import { SEO } from "@/components/common/SEO";
2+
import { Seo } from "@/components/common/Seo";
33
import { services, eticsBenefits, processSteps } from "@/data/servicesData";
44

55
const ServicesPage = () => {
66
return (
77
<div className="flex flex-col">
8-
<SEO
8+
<Seo
99
title="Serviços"
1010
description="Conheça os nossos serviços de isolamento térmico (ETICS/Capoto), renovação de fachadas, pintura e limpeza de telhados."
1111
canonical="/servicos"

0 commit comments

Comments
 (0)