Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
import FocusTrap from 'focus-trap-react';
|
||||
import { Avatar, Box, config, Input, Line, MenuItem, Modal, Overlay, OverlayCenter, Scroll, Text, toRem } from 'folds';
|
||||
import { Icon, Icons } from '../../components/icons';
|
||||
import {
|
||||
Avatar,
|
||||
Box,
|
||||
config,
|
||||
Input,
|
||||
Line,
|
||||
MenuItem,
|
||||
Modal,
|
||||
Overlay,
|
||||
OverlayCenter,
|
||||
Scroll,
|
||||
Text,
|
||||
toRem,
|
||||
} from 'folds';
|
||||
import React, {
|
||||
ChangeEventHandler,
|
||||
KeyboardEventHandler,
|
||||
@@ -14,6 +26,7 @@ import React, {
|
||||
import { isKeyHotkey } from 'is-hotkey';
|
||||
import { useAtom, useAtomValue } from 'jotai';
|
||||
import { Room } from 'matrix-js-sdk';
|
||||
import { Icon, Icons } from '../../components/icons';
|
||||
import { useDirects, useOrphanSpaces, useRooms, useSpaces } from '../../state/hooks/roomList';
|
||||
import { useMatrixClient } from '../../hooks/useMatrixClient';
|
||||
import { mDirectAtom } from '../../state/mDirectList';
|
||||
@@ -63,7 +76,7 @@ const useTopActiveRooms = (
|
||||
searchRoomType: SearchRoomType | undefined,
|
||||
rooms: string[],
|
||||
directs: string[],
|
||||
spaces: string[]
|
||||
spaces: string[],
|
||||
) => {
|
||||
const mx = useMatrixClient();
|
||||
|
||||
@@ -84,7 +97,7 @@ const useTopActiveRooms = (
|
||||
const getDmUserId = (
|
||||
roomId: string,
|
||||
getRoom: (roomId: string) => Room | undefined,
|
||||
myUserId: string
|
||||
myUserId: string,
|
||||
): string | undefined => {
|
||||
const room = getRoom(roomId);
|
||||
const targetUserId = room && guessDmRoomUserId(room, myUserId);
|
||||
@@ -95,7 +108,7 @@ const useSearchTargetRooms = (
|
||||
searchRoomType: SearchRoomType | undefined,
|
||||
rooms: string[],
|
||||
directs: string[],
|
||||
spaces: string[]
|
||||
spaces: string[],
|
||||
) =>
|
||||
useMemo(() => {
|
||||
if (searchRoomType === undefined) {
|
||||
@@ -165,7 +178,7 @@ export function Search({ requestClose }: SearchProps) {
|
||||
}
|
||||
return roomName;
|
||||
},
|
||||
[getRoom, mDirects, mx]
|
||||
[getRoom, mDirects, mx],
|
||||
);
|
||||
|
||||
const [result, search, resetSearch] = useAsyncSearch(targetRooms, getTargetStr, SEARCH_OPTIONS);
|
||||
@@ -439,8 +452,8 @@ export function SearchModalRenderer() {
|
||||
setOpen(true);
|
||||
}
|
||||
},
|
||||
[opened, setOpen]
|
||||
)
|
||||
[opened, setOpen],
|
||||
),
|
||||
);
|
||||
|
||||
return opened && <Search requestClose={() => setOpen(false)} />;
|
||||
|
||||
Reference in New Issue
Block a user