Skip to content

Commit

Permalink
Disable diff for no changes (vercel#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyphilemon authored Nov 6, 2024
1 parent 6801f3a commit 22a09de
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions components/custom/canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,18 @@ export function Canvas({
<TooltipTrigger asChild>
<Button
variant="outline"
className={cx('p-2 h-fit dark:hover:bg-zinc-700', {
'bg-muted': mode === 'diff',
})}
className={cx(
'p-2 h-fit !pointer-events-auto dark:hover:bg-zinc-700',
{
'bg-muted': mode === 'diff',
}
)}
onClick={() => {
handleVersionChange('toggle');
}}
disabled={canvas.status === 'streaming'}
disabled={
canvas.status === 'streaming' || currentVersionIndex === 0
}
>
<DeltaIcon size={18} />
</Button>
Expand Down

0 comments on commit 22a09de

Please sign in to comment.