From b0b55135e8469d0847eb691f18e050796ca3efe5 Mon Sep 17 00:00:00 2001 From: Regalijan Date: Fri, 1 Nov 2024 22:10:51 -0400 Subject: [PATCH] Add click to copy --- app/routes/short-links.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/routes/short-links.tsx b/app/routes/short-links.tsx index 249c23d..05964ba 100644 --- a/app/routes/short-links.tsx +++ b/app/routes/short-links.tsx @@ -100,7 +100,16 @@ export default function () { return ( {entry.destination} - {entry.path} + { + navigator.clipboard.writeText( + `https://carcrushe.rs/${entry.path}`, + ); + alert("Link copied"); + }} + > + https://carcrushe.rs/{entry.path} +