import React from "react"; import { Box, Stack, Text, Flex, Link, Spinner } from "@chakra-ui/react"; import NextLink from "next/link"; import { GetTranscriptMinimal } from "../../../api"; import { formatTimeMs, formatLocalDate } from "../../../lib/time"; import TranscriptStatusIcon from "./TranscriptStatusIcon"; import TranscriptActionsMenu from "./TranscriptActionsMenu"; interface TranscriptCardsProps { transcripts: GetTranscriptMinimal[]; onDelete: (transcriptId: string) => (e: any) => void; onReprocess: (transcriptId: string) => (e: any) => void; loading?: boolean; } export default function TranscriptCards({ transcripts, onDelete, onReprocess, loading, }: TranscriptCardsProps) { return ( {loading && ( )} {transcripts.map((item) => ( {item.title || "Unnamed Transcript"} Source:{" "} {item.source_kind === "room" ? item.room_name : item.source_kind} Date: {formatLocalDate(item.created_at)} Duration: {formatTimeMs(item.duration)} ))} ); }