diff --git a/apps/dashboard/app/(app)/logs/components/log-details/components/log-meta.tsx b/apps/dashboard/app/(app)/logs/components/log-details/components/log-meta.tsx index 9fa3fc717..bc7cfd930 100644 --- a/apps/dashboard/app/(app)/logs/components/log-details/components/log-meta.tsx +++ b/apps/dashboard/app/(app)/logs/components/log-details/components/log-meta.tsx @@ -1,12 +1,36 @@ +import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; +import { toast } from "@/components/ui/toaster"; +import { Copy } from "lucide-react"; export const LogMetaSection = ({ content }: { content: string }) => { + const handleClick = () => { + navigator.clipboard + .writeText(content) + .then(() => { + toast.success("Meta copied to clipboard"); + }) + .catch((error) => { + console.error("Failed to copy to clipboard:", error); + toast.error("Failed to copy to clipboard"); + }); + }; + return (
{content}+
{Array.isArray(details)
? details.map((header) => {
@@ -19,7 +36,7 @@ export const LogSection = ({
const value = valueParts.join(":").trim();
return (
- {key}
+ {key}
: {value}
{"\n"}
@@ -27,8 +44,30 @@ export const LogSection = ({
})
: details}
+