Skip to content

Commit

Permalink
refactor: simplify SendButton component by exporting PureSendButton d…
Browse files Browse the repository at this point in the history
…irectly
  • Loading branch information
athrael-soju committed Dec 19, 2024
1 parent 1156322 commit 38180ae
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions components/multimodal-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,4 @@ function PureSendButton({
);
}

const SendButton = memo(PureSendButton, (prevProps, nextProps) => {
if (prevProps.uploadQueue.length !== nextProps.uploadQueue.length)
return false;
if (!prevProps.input !== !nextProps.input) return false;
return true;
});
const SendButton = PureSendButton;

0 comments on commit 38180ae

Please sign in to comment.