Better curl import

This commit is contained in:
Gregory Schier
2024-08-10 07:53:26 -07:00
parent 2f9532cf53
commit 08ea48b996
8 changed files with 72 additions and 78 deletions

View File

@@ -1,4 +1,4 @@
import { useClipboardText } from '../hooks/useClipboardText';
import { useCopy } from '../hooks/useCopy';
import { useTimedBoolean } from '../hooks/useTimedBoolean';
import type { ButtonProps } from './core/Button';
import { Button } from './core/Button';
@@ -8,7 +8,7 @@ interface Props extends ButtonProps {
}
export function CopyButton({ text, ...props }: Props) {
const [, copy] = useClipboardText({ disableToast: true });
const copy = useCopy({ disableToast: true });
const [copied, setCopied] = useTimedBoolean();
return (
<Button