Skip to content

Commit

Permalink
Add memoization to SendButton and add TODO for input handling before …
Browse files Browse the repository at this point in the history
…form submission
  • Loading branch information
athrael-soju committed Dec 19, 2024
1 parent dbe9766 commit 8049c1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/multimodal-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function PureMultimodalInput({

const submitForm = useCallback(() => {
window.history.replaceState({}, '', `/chat/${chatId}`);

// TODO: input before submit
handleSubmit(undefined, {
experimental_attachments: attachments,
});
Expand Down Expand Up @@ -346,4 +346,4 @@ function PureSendButton({
);
}

const SendButton = PureSendButton;
const SendButton = memo(PureSendButton);

0 comments on commit 8049c1c

Please sign in to comment.