Disable diff for no changes (#501)
This commit is contained in:
parent
6801f3a236
commit
22a09de6e6
1 changed files with 9 additions and 4 deletions
|
|
@ -488,13 +488,18 @@ export function Canvas({
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
className={cx('p-2 h-fit dark:hover:bg-zinc-700', {
|
className={cx(
|
||||||
'bg-muted': mode === 'diff',
|
'p-2 h-fit !pointer-events-auto dark:hover:bg-zinc-700',
|
||||||
})}
|
{
|
||||||
|
'bg-muted': mode === 'diff',
|
||||||
|
}
|
||||||
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
handleVersionChange('toggle');
|
handleVersionChange('toggle');
|
||||||
}}
|
}}
|
||||||
disabled={canvas.status === 'streaming'}
|
disabled={
|
||||||
|
canvas.status === 'streaming' || currentVersionIndex === 0
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<DeltaIcon size={18} />
|
<DeltaIcon size={18} />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue