(text: string)
| 2 | import { toast } from "sonner" |
| 3 | |
| 4 | export async function copy(text: string) { |
| 5 | try { |
| 6 | await navigator.clipboard.writeText(text) |
| 7 | toast.success("Copied to clipboard") |
| 8 | } catch (err) { |
| 9 | console.error(err) |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | export function getQuery<T>(key: string, defaultValue?: T) { |
| 14 | if (typeof window === "undefined") { |