diff --git a/src/components/TitleCardList.tsx b/src/components/TitleCardList.tsx deleted file mode 100644 index cf05a0d63a1..00000000000 --- a/src/components/TitleCardList.tsx +++ /dev/null @@ -1,210 +0,0 @@ -import React from "react" -import { IoCodeOutline } from "react-icons/io5" -import { - Box, - Flex, - Hide, - Icon, - LinkBox, - LinkOverlay, - useColorModeValue, -} from "@chakra-ui/react" - -import { TranslationKey } from "@/lib/types" -import { ITitleCardItem } from "@/lib/interfaces" - -import { Image } from "@/components/Image" -import { BaseLink } from "@/components/Link" -import Translation from "@/components/Translation" - -export type TitleCardListProps = { - content: Array - className?: string - clickHandler: (idx: number) => void - headerKey: TranslationKey - isCode: boolean -} - -const TitleCardList = ({ - content, - className, - clickHandler, - headerKey, - isCode, -}: TitleCardListProps) => { - // This will be accessible with color contrast - const descriptionCaptionColor = useColorModeValue( - "blackAlpha.700", - "whiteAlpha.700" - ) - return ( - - - - - {isCode && ( - - - - - - - - )} - - {content.map((listItem, idx) => { - const { title, description, caption, link, image, alt, id } = listItem - const isLink = !!link - - return isLink ? ( - - {image && ( - {alt - )} - - - {title} - - - - {description} - - - {caption && ( - - - {caption} - - - )} - - ) : ( - clickHandler(idx)} - width="100%" - marginBottom="1px" - padding={4} - textDecoration="none" - color="text" - justifyContent="space-between" - cursor="pointer" - boxShadow="0px 1px 1px var(--eth-colors-tableItemBoxShadow)" - _hover={{ - boxShadow: "0 0 1px var(--eth-colors-primary-base)", - bg: "primary100", - "*": { color: "black" }, - }} - > - {image && ( - {alt - )} - - {title} - - - {description} - - - {caption && ( - - - {caption} - - - )} - - ) - })} - - ) -} - -export default TitleCardList diff --git a/src/lib/interfaces.ts b/src/lib/interfaces.ts index 57def255f10..c5f8537aed5 100644 --- a/src/lib/interfaces.ts +++ b/src/lib/interfaces.ts @@ -161,10 +161,10 @@ export interface IGetInvolvedCard { } /** - * TitleCardList + * Codeblock */ -export interface ITitleCardItem { +export interface CodeExample { title: string description: string caption?: string @@ -172,13 +172,6 @@ export interface ITitleCardItem { image?: string alt?: string id?: number -} - -/** - * Codeblock - */ - -export interface CodeExample extends ITitleCardItem { codeLanguage: string code: string eventName: string