diff --git a/react-frontend/src/pages/dashboard.tsx b/react-frontend/src/pages/dashboard.tsx
index a5de4ac..98c0ee4 100644
--- a/react-frontend/src/pages/dashboard.tsx
+++ b/react-frontend/src/pages/dashboard.tsx
@@ -6,6 +6,9 @@ import { useParams } from 'react-router-dom'
import { useEffect, useState } from 'react'
import { Bar, BarChart, ResponsiveContainer, XAxis, YAxis } from 'recharts'
+import { ArrowRight, Copy } from 'lucide-react'
+import { useToast } from '@/components/ui/use-toast'
+import { Toaster } from '@/components/ui/toaster'
type Shortener = {
id: number
@@ -88,6 +91,15 @@ export default function Dashboard() {
console.log(visitorData)
}
+ const { toast } = useToast()
+ const copyLinkToClipboard = async (code: string) => {
+ await navigator.clipboard.writeText(backend_url + '/' + code)
+ toast({
+ title: 'Link Copied',
+ description: `Copied ${backend_url + '/' + code} To Clipboard`,
+ })
+ }
+
useEffect(() => {
if (!shorteners.length) {
getShorteners()
@@ -103,8 +115,19 @@ export default function Dashboard() {