Frontend update table shortener copy to cursor pointer

pull/3/head
TZGyn 2 years ago
parent 0725145562
commit 6f6834302a
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -144,7 +144,6 @@ const ShortenerTable = ({ shorteners }: { shorteners: Shortener[] }) => {
const { toast } = useToast() const { toast } = useToast()
const copyLinkToClipboard = async (code: string) => { const copyLinkToClipboard = async (code: string) => {
await navigator.clipboard.writeText(backend_url + '/' + code) await navigator.clipboard.writeText(backend_url + '/' + code)
console.log(code)
toast({ toast({
title: 'Link Copied', title: 'Link Copied',
description: `Copied ${backend_url + '/' + code} To Clipboard`, description: `Copied ${backend_url + '/' + code} To Clipboard`,
@ -168,6 +167,7 @@ const ShortenerTable = ({ shorteners }: { shorteners: Shortener[] }) => {
<TableRow key={shortener.id}> <TableRow key={shortener.id}>
<TableCell>{shortener.link}</TableCell> <TableCell>{shortener.link}</TableCell>
<TableCell <TableCell
className='cursor-pointer select-none'
onClick={() => onClick={() =>
copyLinkToClipboard(shortener.code) copyLinkToClipboard(shortener.code)
}> }>

Loading…
Cancel
Save