* feature(auth): replace clerk.com with custom auth * minor fixes * remove notification preferences * decrease live events interval fix(api): cookies.. # Conflicts: # .gitignore # apps/api/src/index.ts # apps/dashboard/src/app/providers.tsx # packages/trpc/src/trpc.ts
14 lines
321 B
TypeScript
14 lines
321 B
TypeScript
import { toast } from 'sonner';
|
|
|
|
export function clipboard(value: string | number, description?: null | string) {
|
|
navigator.clipboard.writeText(value.toString());
|
|
toast(
|
|
'Copied to clipboard',
|
|
description !== null
|
|
? {
|
|
description: description ?? value.toString(),
|
|
}
|
|
: {},
|
|
);
|
|
}
|