Memoize toasts to unstick them in AudioCapture
This commit is contained in:
parent
f4b0bade80
commit
7488fa5abc
2 changed files with 85 additions and 77 deletions
|
@ -134,9 +134,9 @@ export const AudioCapture = ({
|
|||
completeRecording(conversationId, onSendAudioRecording);
|
||||
}, [conversationId, completeRecording, onSendAudioRecording]);
|
||||
|
||||
function closeToast() {
|
||||
const closeToast = useCallback(() => {
|
||||
setToastType(undefined);
|
||||
}
|
||||
}, []);
|
||||
|
||||
let toastElement: JSX.Element | undefined;
|
||||
if (toastType === ToastType.VoiceNoteLimit) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue