import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "~/components/ui/card" import { cn } from "~/lib/utils" import Markdown from 'react-markdown' import { format } from 'date-fns' import rehypeHighlight from 'rehype-highlight' import rehypeRaw from 'rehype-raw' import type { ArrayElement } from "type-fest" import AnimateTextIn from "~/app/_components/Animated/AnimateIn" import AnimatePopUp from "~/app/_components/Animated/AnimatePopUp" import type { CvCategoryData } from "./CvCategory" export type CvEntryData = ArrayElement export default function CvEntry({ entry, className, position = 0 }: { entry: CvEntryData, className?: string, position?: number }) { return ( {entry.title ? {entry.title} : <> } {entry.description ?
{entry.description}
: <> } {!entry.hideDates ? {`von ${format(new Date(entry.fromTime), 'M. yyyy')} bis zum ${format(new Date(entry.toTime), 'M. yyyy')}`} : <> }
) }