Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
import React, { FormEventHandler, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Box, Text, IconButton, Chip, Scroll, config, TextArea, color, Spinner, Button } from 'folds';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import {
|
||||
Box,
|
||||
Text,
|
||||
IconButton,
|
||||
Chip,
|
||||
Scroll,
|
||||
config,
|
||||
TextArea,
|
||||
color,
|
||||
Spinner,
|
||||
Button,
|
||||
} from 'folds';
|
||||
import { MatrixError } from 'matrix-js-sdk';
|
||||
import { Icon, Icons } from '../../../components/icons';
|
||||
import { Page, PageHeader } from '../../../components/page';
|
||||
import { SequenceCard } from '../../../components/sequence-card';
|
||||
import { TextViewerContent } from '../../../components/text-viewer';
|
||||
@@ -35,21 +46,21 @@ function StateEventEdit({ type, stateKey, content, requestClose }: StateEventEdi
|
||||
|
||||
const defaultContentStr = useMemo(
|
||||
() => JSON.stringify(content, undefined, EDITOR_INTENT_SPACE_COUNT),
|
||||
[content]
|
||||
[content],
|
||||
);
|
||||
|
||||
const textAreaRef = useRef<HTMLTextAreaElement>(null);
|
||||
const [jsonError, setJSONError] = useState<SyntaxError>();
|
||||
const { handleKeyDown, operations, getTarget } = useTextAreaCodeEditor(
|
||||
textAreaRef,
|
||||
EDITOR_INTENT_SPACE_COUNT
|
||||
EDITOR_INTENT_SPACE_COUNT,
|
||||
);
|
||||
|
||||
const [submitState, submit] = useAsyncCallback<object, MatrixError, [object]>(
|
||||
useCallback(
|
||||
(c) => mx.sendStateEvent(room.roomId, type as any, c, stateKey),
|
||||
[mx, room, type, stateKey]
|
||||
)
|
||||
[mx, room, type, stateKey],
|
||||
),
|
||||
);
|
||||
const submitting = submitState.status === AsyncStatus.Loading;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user