diff --git a/src/components/sections/blog/BlogArticle.tsx b/src/components/sections/blog/BlogArticle.tsx index e79f707..e69de29 100644 --- a/src/components/sections/blog/BlogArticle.tsx +++ b/src/components/sections/blog/BlogArticle.tsx @@ -1,94 +0,0 @@ -import ScrollReveal from "@/components/ui/ScrollReveal"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; - -type BlogArticleProps = { - category: string; - title: string; - excerpt?: string; - content: string; - imageSrc: string; - authorName: string; - authorImageSrc: string; - date: string; - readingTime?: string; - backButton?: { text: string; href: string }; -}; - -const BlogArticle = ({ - category, - title, - excerpt, - content, - imageSrc, - authorName, - authorImageSrc, - date, - readingTime, - backButton = { text: "Back to Blog", href: "/blog" }, -}: BlogArticleProps) => { - return ( -
-
- -
-
- - {backButton.text} - - / - {category} -
- -
- -

- {title} -

- - {excerpt && ( -

- {excerpt} -

- )} - -
- -
- {authorName} - - {date} - {readingTime && ` ยท ${readingTime}`} - -
-
-
-
-
- - -
- -
-
- - -
- -
-
- ); -}; - -export default BlogArticle; diff --git a/src/components/sections/footer/FooterSimpleMedia.tsx b/src/components/sections/footer/FooterSimpleMedia.tsx index 5c3cac5..e69de29 100644 --- a/src/components/sections/footer/FooterSimpleMedia.tsx +++ b/src/components/sections/footer/FooterSimpleMedia.tsx @@ -1,95 +0,0 @@ -import { useButtonClick } from "@/hooks/useButtonClick"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; - -type FooterLink = { - label: string; - href?: string; - onClick?: () => void; -}; - -type FooterColumn = { - title: string; - items: FooterLink[]; -}; - -const FooterLinkItem = ({ label, href, onClick }: FooterLink) => { - const handleClick = useButtonClick(href, onClick); - - return ( - - ); -}; - -const FooterBottomLink = ({ label, href, onClick }: FooterLink) => { - const handleClick = useButtonClick(href, onClick); - - return ( - - ); -}; - -const FooterSimpleMedia = ({ - imageSrc, - videoSrc, - brand, - columns, - copyright, - links, -}: ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }) & { - brand: string; - columns: FooterColumn[]; - copyright: string; - links: FooterLink[]; -}) => { - return ( - - ); -}; - -export default FooterSimpleMedia; diff --git a/src/components/sections/hero/HeroBillboardCarousel.tsx b/src/components/sections/hero/HeroBillboardCarousel.tsx index 24d3d50..e69de29 100644 --- a/src/components/sections/hero/HeroBillboardCarousel.tsx +++ b/src/components/sections/hero/HeroBillboardCarousel.tsx @@ -1,75 +0,0 @@ -import Button from "@/components/ui/Button"; -import HeroBackgroundSlot from "@/components/ui/HeroBackgroundSlot"; -import TextAnimation from "@/components/ui/TextAnimation"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; - -type HeroBillboardCarouselProps = { - tag: string; - title: string; - description: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: string }; - items: ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never })[]; -}; - -const HeroBillboardCarousel = ({ - tag, - title, - description, - primaryButton, - secondaryButton, - items, -}: HeroBillboardCarouselProps) => { - const duplicated = [...items, ...items, ...items, ...items]; - - return ( -
- -
-
-

{tag}

-
- - - - - -
-
-
- -
-
- {duplicated.map((item, i) => ( -
- -
- ))} -
-
-
- ); -}; - -export default HeroBillboardCarousel; diff --git a/src/components/sections/hero/HeroBrandCarousel.tsx b/src/components/sections/hero/HeroBrandCarousel.tsx index f645b5c..e69de29 100644 --- a/src/components/sections/hero/HeroBrandCarousel.tsx +++ b/src/components/sections/hero/HeroBrandCarousel.tsx @@ -1,109 +0,0 @@ -import { useEffect, useState } from "react"; -import Button from "@/components/ui/Button"; -import HeroBackgroundSlot from "@/components/ui/HeroBackgroundSlot"; -import TextAnimation from "@/components/ui/TextAnimation"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import AutoFillText from "@/components/ui/AutoFillText"; -import { cls } from "@/lib/utils"; - -type HeroBrandCarouselProps = { - brand: string; - description: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: string }; - items: ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never })[]; -}; - -const INTERVAL = 4000; - -const HeroBrandCarousel = ({ - brand, - description, - primaryButton, - secondaryButton, - items, -}: HeroBrandCarouselProps) => { - const [currentIndex, setCurrentIndex] = useState(0); - - useEffect(() => { - const interval = setInterval(() => { - setCurrentIndex((prev) => (prev + 1) % items.length); - }, INTERVAL); - return () => clearInterval(interval); - }, [currentIndex, items.length]); - - return ( -
- - {items.map((item, index) => ( -
- -
- ))} - -
- ); -}; - -export default HeroBrandCarousel; diff --git a/src/components/templates/ResultsComparison.tsx b/src/components/templates/ResultsComparison.tsx index 6b8c699..e69de29 100644 --- a/src/components/templates/ResultsComparison.tsx +++ b/src/components/templates/ResultsComparison.tsx @@ -1,110 +0,0 @@ -import Button from "@/components/ui/Button"; -import TextAnimation from "@/components/ui/TextAnimation"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import ScrollReveal from "@/components/ui/ScrollReveal"; -import { cls } from "@/lib/utils"; - -type ResultItem = { - treatment: string; - detail: string; - beforeSrc: string; - afterSrc: string; -}; - -interface ResultsComparisonProps { - tag: string; - title: string; - description: string; - primaryButton?: { text: string; href: string }; - secondaryButton?: { text: string; href: string }; - items: ResultItem[]; -} - -const ImageLabel = ({ text, side }: { text: string; side: "left" | "right" }) => ( -
-

{text}

-
-); - -const ResultsComparison = ({ - tag, - title, - description, - primaryButton, - secondaryButton, - items, -}: ResultsComparisonProps) => { - const duplicated = [...items, ...items, ...items, ...items]; - - return ( -
-
-
-
-

{tag}

-
- - - - - - {(primaryButton || secondaryButton) && ( -
- {primaryButton &&
- )} -
- - -
-
- {duplicated.map((item, i) => ( -
-
-
- - -
-
-
- - -
-
-
-

- {item.treatment} -

-

- {item.detail} -

-
-
- ))} -
-
- -
-
- ); -}; - -export default ResultsComparison; diff --git a/src/components/ui/LightRaysCornerBackground.tsx b/src/components/ui/LightRaysCornerBackground.tsx index dab55c3..e69de29 100644 --- a/src/components/ui/LightRaysCornerBackground.tsx +++ b/src/components/ui/LightRaysCornerBackground.tsx @@ -1,54 +0,0 @@ -import { cls } from "@/lib/utils"; - -type LightRaysCornerBackgroundProps = { - position: "fixed" | "absolute"; -}; - -const LightRaysCornerBackground = ({ position }: LightRaysCornerBackgroundProps) => { - return ( -