From 9db958743b35406d6e6fc37aa6ef1124ec2240c8 Mon Sep 17 00:00:00 2001 From: Mackie Date: Sat, 6 Jun 2026 08:25:06 +0800 Subject: [PATCH] test --- src/blocks/Showcase/Component.tsx | 142 +----------------------------- 1 file changed, 1 insertion(+), 141 deletions(-) diff --git a/src/blocks/Showcase/Component.tsx b/src/blocks/Showcase/Component.tsx index 4ce1076..0cfbf08 100644 --- a/src/blocks/Showcase/Component.tsx +++ b/src/blocks/Showcase/Component.tsx @@ -1,141 +1 @@ -'use client' - -import React, { useState } from 'react' -import Image from 'next/image' -import { Container } from '@/components/ui/Container' -import type { Media as MediaType } from '@/payload-types' - -// Updated type to include category for the 15-project Lab structure -type ShowcaseItem = { - image?: MediaType | null - imageUrl?: string - title: string - description?: string - category: 'engineering' | 'design' - tags?: { tag: string }[] - links?: { label: string; url: string; newTab?: boolean }[] -} - -type ShowcaseBlockProps = { - heading?: string - subheading?: string - items?: ShowcaseItem[] -} - -function ShowcaseImage({ item }: { item: ShowcaseItem }): React.ReactElement { - const image = item.image - const imageUrl = image != null && typeof image === 'object' && 'url' in image ? image.url : null - const imageAlt = - image != null && typeof image === 'object' && 'alt' in image ? image.alt : item.title - - const imgContent = ( -
- {imageUrl ? ( - {imageAlt - ) : ( -
-