The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord

fix dev-dash copy link

+12 -2
+1
app/dashboard/[guildId]/layout.tsx
··· 196 196 <div className="md:ml-auto mt-6 md:mt-0"> 197 197 {web.devToolsEnabled && 198 198 <CopyToClipboardButton 199 + needsWait 199 200 text={getCanonicalUrl("leaderboard", params.guildId.toString())} 200 201 items={[ 201 202 { icon: <HiShare />, name: "Copy page url", description: "Creates a link to this specific page", text: getCanonicalUrl(...path.split("/").slice(1)) },
+11 -2
components/copy-to-clipboard.tsx
··· 20 20 title?: string; 21 21 className?: string; 22 22 items?: { icon?: React.ReactNode, name: string, description?: string, text: string }[]; 23 + needsWait?: boolean; 23 24 } 24 25 25 - export function CopyToClipboardButton({ icon, text, title, className = "", items }: Props) { 26 + export function CopyToClipboardButton({ 27 + icon, 28 + text, 29 + title, 30 + className, 31 + items, 32 + needsWait 33 + }: Props) { 26 34 const timeoutRef = useRef<NodeJS.Timeout | null>(null); 27 35 28 36 const [saved, setSaved] = useState<boolean>(false); 29 37 30 38 const handleCopy = (t: string) => { 31 - copyToClipboard(t); 39 + copyToClipboard(t, needsWait); 32 40 setSaved(true); 33 41 34 42 if (timeoutRef.current) clearInterval(timeoutRef.current); ··· 69 77 key={i} 70 78 description={item.description} 71 79 startContent={item.icon} 80 + className="backdrop-blur-md" 72 81 > 73 82 {item.name} 74 83 </DropdownItem>