Skip to content

Commit

Permalink
add confirm toast on copy to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
marhaupe committed Oct 13, 2024
1 parent 59fe8be commit 66044c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/frontend/src/components/LogEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import { Log } from "@/types";
import { useNavigate } from "react-router-dom";
import { toast } from "sonner";

export interface LogEntryProps {
log: Log;
Expand Down Expand Up @@ -74,6 +75,7 @@ export function LogEntry({

function copyToClipboard() {
navigator.clipboard.writeText(log.message);
toast.success("Copied to clipboard");
}

return (
Expand Down

0 comments on commit 66044c4

Please sign in to comment.