"use client"; import { Check } from "lucide-react"; import React, { useEffect } from "react"; interface ToolLog { id: string | number; message: string; status: "processing" | "completed"; } interface ToolLogsProps { logs: ToolLog[]; } export function ToolLogs({ logs }: ToolLogsProps) { useEffect(() => { console.log(logs, "logs"); }, []); return (
{logs.map((log) => (
{log.status === "processing" ? ( ) : ( )} {log.message}
))}
); } // Example usage (remove in production): // const sampleLogs = [ // { id: 1, message: "Fetching stock data...", status: "processing" }, // { id: 2, message: "Analysis complete!", status: "completed" }, // ] //