Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -6,10 +6,10 @@ import React, {
|
||||
useState,
|
||||
} from 'react';
|
||||
import { Box, Chip, IconButton, Line, PopOut, RectCords, Spinner, Text, as, config } from 'folds';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { Editor, Transforms } from 'slate';
|
||||
import { IContent, IMentions, MatrixEvent, RelationType, Room } from 'matrix-js-sdk';
|
||||
import { isKeyHotkey } from 'is-hotkey';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import {
|
||||
AUTOCOMPLETE_PREFIXES,
|
||||
AutocompletePrefix,
|
||||
@@ -66,7 +66,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
|
||||
const getPrevBodyAndFormattedBody = useCallback((): [
|
||||
string | undefined,
|
||||
string | undefined,
|
||||
IMentions | undefined
|
||||
IMentions | undefined,
|
||||
] => {
|
||||
const evtId = mEvent.getId()!;
|
||||
const evtTimeline = room.getTimelineForEvent(evtId);
|
||||
@@ -93,7 +93,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
|
||||
allowTextFormatting: true,
|
||||
allowBlockMarkdown: isMarkdown,
|
||||
allowInlineMarkdown: isMarkdown,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
const [prevBody, prevCustomHtml, prevMentions] = getPrevBodyAndFormattedBody();
|
||||
@@ -142,7 +142,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
|
||||
};
|
||||
|
||||
return mx.sendMessage(roomId, content);
|
||||
}, [mx, editor, roomId, mEvent, isMarkdown, getPrevBodyAndFormattedBody])
|
||||
}, [mx, editor, roomId, mEvent, isMarkdown, getPrevBodyAndFormattedBody]),
|
||||
);
|
||||
|
||||
const handleSave = useCallback(() => {
|
||||
@@ -165,7 +165,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
|
||||
onCancel();
|
||||
}
|
||||
},
|
||||
[onCancel, handleSave, enterForNewline, isComposing]
|
||||
[onCancel, handleSave, enterForNewline, isComposing],
|
||||
);
|
||||
|
||||
const handleKeyUp: KeyboardEventHandler = useCallback(
|
||||
@@ -181,7 +181,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
|
||||
: undefined;
|
||||
setAutocompleteQuery(query);
|
||||
},
|
||||
[editor]
|
||||
[editor],
|
||||
);
|
||||
|
||||
const handleCloseAutocomplete = useCallback(() => {
|
||||
@@ -314,7 +314,7 @@ export const MessageEditor = as<'div', MessageEditorProps>(
|
||||
onClick={
|
||||
((evt) =>
|
||||
setAnchor(
|
||||
evt.currentTarget.getBoundingClientRect()
|
||||
evt.currentTarget.getBoundingClientRect(),
|
||||
)) as MouseEventHandler<HTMLButtonElement>
|
||||
}
|
||||
variant="SurfaceVariant"
|
||||
@@ -339,5 +339,5 @@ export const MessageEditor = as<'div', MessageEditorProps>(
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user