mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 19:07:08 -04:00
ReviewDB fixes
This commit is contained in:
parent
8bd54173db
commit
a171b35e97
4 changed files with 24 additions and 24 deletions
|
@ -28,8 +28,8 @@ import { cl } from "../utils";
|
|||
import ReviewComponent from "./ReviewComponent";
|
||||
|
||||
|
||||
const Slate = findByPropsLazy("Editor", "Transforms");
|
||||
const InputTypes = findByPropsLazy("ChatInputTypes");
|
||||
const { Editor, Transforms } = findByPropsLazy("Editor", "Transforms");
|
||||
const { ChatInputTypes } = findByPropsLazy("ChatInputTypes");
|
||||
|
||||
const InputComponent = LazyComponent(() => find(m => m.default?.type?.render?.toString().includes("default.CHANNEL_TEXT_AREA")).default);
|
||||
|
||||
|
@ -122,7 +122,7 @@ function ReviewList({ refetch, reviews, hideOwnReview, profileId }: { refetch():
|
|||
export function ReviewsInputComponent({ discordId, isAuthor, refetch, name }: { discordId: string, name: string; isAuthor: boolean; refetch(): void; }) {
|
||||
const { token } = Auth;
|
||||
const editorRef = useRef<any>(null);
|
||||
const inputType = InputTypes.ChatInputTypes.FORM;
|
||||
const inputType = ChatInputTypes.FORM;
|
||||
inputType.disableAutoFocus = true;
|
||||
|
||||
const channel = {
|
||||
|
@ -172,10 +172,9 @@ export function ReviewsInputComponent({ discordId, isAuthor, refetch, name }: {
|
|||
refetch();
|
||||
|
||||
const slateEditor = editorRef.current.ref.current.getSlateEditor();
|
||||
const { Editor, Transform } = Slate;
|
||||
|
||||
// clear editor
|
||||
Transform.delete(slateEditor, {
|
||||
Transforms.delete(slateEditor, {
|
||||
at: {
|
||||
anchor: Editor.start(slateEditor, []),
|
||||
focus: Editor.end(slateEditor, []),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue