Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -2,6 +2,8 @@ import React, { KeyboardEventHandler, useCallback, useRef, useState } from 'reac
|
||||
import { isKeyHotkey } from 'is-hotkey';
|
||||
import { Editor } from 'slate';
|
||||
import { IconButton, Line, PopOut } from 'folds';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { Room } from 'matrix-js-sdk';
|
||||
import { Icon, Icons } from '../../components/icons';
|
||||
import {
|
||||
CustomEditor,
|
||||
@@ -19,9 +21,7 @@ import { UseStateProvider } from '../../components/UseStateProvider';
|
||||
import { useSetting } from '../../state/hooks/settings';
|
||||
import { settingsAtom } from '../../state/settings';
|
||||
import { useImagePackRooms } from '../../hooks/useImagePackRooms';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { roomToParentsAtom } from '../../state/room/roomToParents';
|
||||
import { Room } from 'matrix-js-sdk';
|
||||
import { mobileOrTablet } from '../../utils/user-agent';
|
||||
import { PluginButtonSlot } from '../settings/plugins/PluginButtonSlot';
|
||||
|
||||
@@ -62,7 +62,7 @@ export function ForumChatComposer({
|
||||
onSend();
|
||||
}
|
||||
},
|
||||
[enterForNewline, onSend]
|
||||
[enterForNewline, onSend],
|
||||
);
|
||||
|
||||
const handleKeyUp: KeyboardEventHandler = useCallback(
|
||||
@@ -74,7 +74,7 @@ export function ForumChatComposer({
|
||||
}
|
||||
setAutocompleteQuery(undefined);
|
||||
},
|
||||
[editor]
|
||||
[editor],
|
||||
);
|
||||
|
||||
const handleEmoticonSelect = (key: string, shortcode: string) => {
|
||||
@@ -126,7 +126,7 @@ export function ForumChatComposer({
|
||||
anchor={
|
||||
emojiBoardTab === undefined
|
||||
? undefined
|
||||
: emojiBtnRef.current?.getBoundingClientRect() ?? undefined
|
||||
: (emojiBtnRef.current?.getBoundingClientRect() ?? undefined)
|
||||
}
|
||||
content={
|
||||
<EmojiBoard
|
||||
@@ -136,15 +136,15 @@ export function ForumChatComposer({
|
||||
returnFocusOnDeactivate={false}
|
||||
onEmojiSelect={handleEmoticonSelect}
|
||||
onCustomEmojiSelect={handleEmoticonSelect}
|
||||
requestClose={() => {
|
||||
setEmojiBoardTab((t) => {
|
||||
if (t) {
|
||||
if (!mobileOrTablet()) safeFocusEditor(editor);
|
||||
return undefined;
|
||||
}
|
||||
return t;
|
||||
});
|
||||
}}
|
||||
requestClose={() => {
|
||||
setEmojiBoardTab((t) => {
|
||||
if (t) {
|
||||
if (!mobileOrTablet()) safeFocusEditor(editor);
|
||||
return undefined;
|
||||
}
|
||||
return t;
|
||||
});
|
||||
}}
|
||||
/>
|
||||
}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user