Skip to content

Commit 295e20d

Browse files
committed
feat: add delete recording
1 parent 561b0df commit 295e20d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/input-message/hooks/use-enter.hook.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export const useEnterHook = (): UseEnterHookType => {
7070
}, [chatOnPage?.id, textExist]);
7171

7272
const sendMessage = useCallback(async () => {
73-
alert(2);
7473
if (!chatOnPage?.id) return;
7574
const element = document.getElementById(styles.new_message)!;
7675
const isFocused = isPhone ? isOpenMobileKeyboard : getIsFocused();
@@ -120,7 +119,7 @@ export const useEnterHook = (): UseEnterHookType => {
120119
const element = document.getElementById(styles.new_message)!;
121120
const background = document.getElementById(styles.background)!;
122121
const buttonStartRecover = document.getElementById(styles.microphone)!;
123-
const sendMessageButton = document.getElementById(styles.button_input_block)!;
122+
// const sendMessageButton = document.getElementById(styles.button_input_block)!;
124123
const microphoneButton = document.getElementById(styles.button_microphone_block);
125124
const buttonMicrophoneDelete = document.getElementById(styles.button_microphone_delete);
126125
const isStandalone = window.matchMedia('(display-mode: standalone)').matches;
@@ -225,7 +224,7 @@ export const useEnterHook = (): UseEnterHookType => {
225224
element.addEventListener('keyup', send);
226225
element.addEventListener('paste', paste);
227226
element.addEventListener('input', onInput);
228-
sendMessageButton.addEventListener('click', sendMessage);
227+
// sendMessageButton.addEventListener('click', sendMessage);
229228
microphoneButton?.addEventListener('mousedown', startRecover);
230229
buttonMicrophoneDelete?.addEventListener('mousedown', stopRecover);
231230
if (isStandalone && isPhone) {
@@ -238,7 +237,7 @@ export const useEnterHook = (): UseEnterHookType => {
238237
element.removeEventListener('keyup', send);
239238
element.removeEventListener('paste', paste);
240239
element.removeEventListener('input', onInput);
241-
sendMessageButton.removeEventListener('click', sendMessage);
240+
// sendMessageButton.removeEventListener('click', sendMessage);
242241
microphoneButton?.removeEventListener('mousedown', startRecover);
243242
buttonMicrophoneDelete?.removeEventListener('mousedown', stopRecover);
244243

0 commit comments

Comments
 (0)