diff --git a/src/components/sections/about/AboutText.tsx b/src/components/sections/about/AboutText.tsx index 54d7edc..e69de29 100644 --- a/src/components/sections/about/AboutText.tsx +++ b/src/components/sections/about/AboutText.tsx @@ -1,37 +0,0 @@ -import Button from "@/components/ui/Button"; -import TextAnimation from "@/components/ui/TextAnimation"; - -interface AboutTextProps { - title: string; - primaryButton?: { text: string; href: string }; - secondaryButton?: { text: string; href: string }; -} - -const AboutText = ({ - title, - primaryButton, - secondaryButton, -}: AboutTextProps) => { - return ( -
-
- - - {(primaryButton || secondaryButton) && ( -
- {primaryButton &&
- )} -
-
- ); -}; - -export default AboutText; diff --git a/src/components/sections/blog/BlogArticle.tsx b/src/components/sections/blog/BlogArticle.tsx index 9a2175e..e69de29 100644 --- a/src/components/sections/blog/BlogArticle.tsx +++ b/src/components/sections/blog/BlogArticle.tsx @@ -1,91 +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/features/FeaturesRevealCardsBentoSharp.tsx b/src/components/sections/features/FeaturesRevealCardsBentoSharp.tsx index bfd3f28..e69de29 100644 --- a/src/components/sections/features/FeaturesRevealCardsBentoSharp.tsx +++ b/src/components/sections/features/FeaturesRevealCardsBentoSharp.tsx @@ -1,109 +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 FeatureItem = { - title: string; - description: string; - href: string; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); - -interface FeaturesRevealCardsBentoSharpProps { - tag: string; - title: string; - description: string; - primaryButton?: { text: string; href: string }; - secondaryButton?: { text: string; href: string }; - items: [FeatureItem, FeatureItem, FeatureItem, FeatureItem, FeatureItem, FeatureItem, FeatureItem]; -} - -const FeaturesRevealCardsBentoSharp = ({ tag, title, description, primaryButton, secondaryButton, items }: FeaturesRevealCardsBentoSharpProps) => { - const gridClasses = [ - "md:col-span-2", - "md:col-span-4", - "md:col-span-3", - "md:col-span-3", - "md:col-span-2", - "md:col-span-2", - "md:col-span-2", - ]; - - const staggerDelays = [ - 0, - 0.1, - 0, - 0.1, - 0, - 0.1, - 0.2, - ]; - - return ( -
-
-
-
-

{tag}

-
- - - - - - {(primaryButton || secondaryButton) && ( -
- {primaryButton &&
- )} -
- -
- {items.map((item, index) => ( - - -
- -
-
-
- ); -}; - -export default FeaturesRevealCardsBentoSharp; diff --git a/src/components/sections/hero/HeroBillboardCarousel.tsx b/src/components/sections/hero/HeroBillboardCarousel.tsx index 1698d84..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/HeroBillboardFeatures.tsx b/src/components/sections/hero/HeroBillboardFeatures.tsx index 311cf89..e69de29 100644 --- a/src/components/sections/hero/HeroBillboardFeatures.tsx +++ b/src/components/sections/hero/HeroBillboardFeatures.tsx @@ -1,105 +0,0 @@ -import { useEffect, useState } from "react"; -import type { LucideIcon } from "lucide-react"; -import { motion, AnimatePresence } from "motion/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 ScrollReveal from "@/components/ui/ScrollReveal"; -import ActiveBadge from "@/components/ui/ActiveBadge"; -import { resolveIcon } from "@/utils/resolve-icon"; - -type FeatureItem = { - icon: string | LucideIcon; - title: string; - description: string; -}; - -type HeroBillboardFeaturesProps = { - badge: string; - title: string; - description: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: string }; - features: FeatureItem[]; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); - -const INTERVAL = 5000; - -const HeroBillboardFeatures = ({ - badge, - title, - description, - primaryButton, - secondaryButton, - imageSrc, - videoSrc, - features, -}: HeroBillboardFeaturesProps) => { - const [currentIndex, setCurrentIndex] = useState(0); - - useEffect(() => { - if (features.length <= 1) return; - - const interval = setInterval(() => { - setCurrentIndex((prev) => (prev + 1) % features.length); - }, INTERVAL); - return () => clearInterval(interval); - }, [features.length]); - - const feature = features[currentIndex]; - const FeatureIcon = resolveIcon(feature.icon); - - return ( -
- -
-
- - - - - - -
-
-
- - - - - - - -

{feature.title}

-

{feature.description}

-
-
-
-
-
- ); -}; - -export default HeroBillboardFeatures; diff --git a/src/components/sections/team/TeamDetailedCards.tsx b/src/components/sections/team/TeamDetailedCards.tsx index 643427c..e69de29 100644 --- a/src/components/sections/team/TeamDetailedCards.tsx +++ b/src/components/sections/team/TeamDetailedCards.tsx @@ -1,108 +0,0 @@ -import type { LucideIcon } from "lucide-react"; -import Button from "@/components/ui/Button"; -import TextAnimation from "@/components/ui/TextAnimation"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import GridOrCarousel from "@/components/ui/GridOrCarousel"; -import ScrollReveal from "@/components/ui/ScrollReveal"; -import { resolveIcon } from "@/utils/resolve-icon"; - -type SocialLink = { - icon: string | LucideIcon; - url: string; -}; - -type TeamMember = { - name: string; - role: string; - description: string; - socialLinks: SocialLink[]; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); - -const TeamDetailedCards = ({ - tag, - title, - description, - primaryButton, - secondaryButton, - members, -}: { - tag: string; - title: string; - description: string; - primaryButton?: { text: string; href: string }; - secondaryButton?: { text: string; href: string }; - members: TeamMember[]; -}) => ( -
-
-
-
-

{tag}

-
- - - - - - {(primaryButton || secondaryButton) && ( -
- {primaryButton &&
- )} -
- - - - {members.map((member) => ( -
- - -
-
- {member.name} -
-

{member.role}

-
-
- -

{member.description}

- -
- {member.socialLinks.map((link, index) => { - const IconComponent = resolveIcon(link.icon); - return ( - - - - ); - })} -
-
-
- ))} -
-
-
-
-); - -export default TeamDetailedCards; diff --git a/src/components/tag/useRiveHoverInput.ts b/src/components/tag/useRiveHoverInput.ts index 98f06a4..e69de29 100644 --- a/src/components/tag/useRiveHoverInput.ts +++ b/src/components/tag/useRiveHoverInput.ts @@ -1,30 +0,0 @@ -import { useCallback, useEffect, useRef } from "react"; -import { useStateMachineInput } from "@rive-app/react-canvas"; - -export function useRiveHoverInput( - rive: unknown, - stateMachineName: string, - hoverInputName: string -) { - const hoverInput = useStateMachineInput( - rive as never, - stateMachineName, - hoverInputName - ); - - const hoverInputRef = useRef(null); - - useEffect(() => { - hoverInputRef.current = hoverInput ?? null; - }, [hoverInput]); - - return useCallback( - (isHovering: boolean) => { - const input = hoverInputRef.current; - if (!input) return; - input.value = isHovering; - }, - [] - ); -} - diff --git a/src/components/ui/ActiveBadge.tsx b/src/components/ui/ActiveBadge.tsx index 1a9c0ea..e69de29 100644 --- a/src/components/ui/ActiveBadge.tsx +++ b/src/components/ui/ActiveBadge.tsx @@ -1,22 +0,0 @@ -import { cls } from "@/lib/utils"; - -interface ActiveBadgeProps { - text: string; - className?: string; -} - -const ActiveBadge = ({ text, className }: ActiveBadgeProps) => { - return ( -
- -

{text}

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