fix lint
This commit is contained in:
parent
3fd5d2497a
commit
bacbe6d783
|
|
@ -55,18 +55,18 @@ const PromptButton: React.FC<{
|
||||||
result?.attachments.find(a => a.name === 'pageSnapshot')?.body
|
result?.attachments.find(a => a.name === 'pageSnapshot')?.body
|
||||||
), [gitCommitInfo, result, error]);
|
), [gitCommitInfo, result, error]);
|
||||||
|
|
||||||
const [copied, setCopied] = React.useState(false);
|
const [copied, setCopied] = React.useState(false);
|
||||||
|
|
||||||
return <button
|
return <button
|
||||||
className='prompt-button'
|
className='prompt-button'
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await navigator.clipboard.writeText(prompt)
|
await navigator.clipboard.writeText(prompt);
|
||||||
setCopied(true);
|
setCopied(true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setCopied(false);
|
setCopied(false);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}}>
|
}}>
|
||||||
{copied ? <span className='prompt-button-copied'>Copied <icons.copy/></span> : 'Fix with AI'}
|
{copied ? <span className='prompt-button-copied'>Copied <icons.copy/></span> : 'Fix with AI'}
|
||||||
</button>;
|
</button>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue