Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Box, Text, color, Scroll } from 'folds';
|
||||
import { Icon, Icons } from '../../components/icons';
|
||||
import classNames from 'classnames';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { Icon, Icons } from '../../components/icons';
|
||||
import { useMatrixClient } from '../../hooks/useMatrixClient';
|
||||
import { usePowerLevels } from '../../hooks/usePowerLevels';
|
||||
import { PowerLevelsContextProvider } from '../../hooks/usePowerLevels';
|
||||
import { usePowerLevels, PowerLevelsContextProvider } from '../../hooks/usePowerLevels';
|
||||
import { Page, PageContent } from '../../components/page';
|
||||
import { ContainerColor } from '../../styles/ContainerColor.css';
|
||||
import { LobbyHeader } from '../lobby/LobbyHeader';
|
||||
@@ -48,7 +47,7 @@ export function ForumSpaceShell() {
|
||||
const topicSelected = Boolean(query.topic);
|
||||
|
||||
const setActiveThreadId = useSetAtom(
|
||||
activeThreadIdAtomFamily(activeTopicRoomId ?? forumSpace.roomId)
|
||||
activeThreadIdAtomFamily(activeTopicRoomId ?? forumSpace.roomId),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -68,12 +67,12 @@ export function ForumSpaceShell() {
|
||||
|
||||
const selectedThread = useMemo(
|
||||
() => threads.find((t) => t.eventId === selectedPostId),
|
||||
[threads, selectedPostId]
|
||||
[threads, selectedPostId],
|
||||
);
|
||||
|
||||
const getTopicRoom = useCallback(
|
||||
(roomId: string | undefined) => (roomId ? mx.getRoom(roomId) : null),
|
||||
[mx]
|
||||
[mx],
|
||||
);
|
||||
|
||||
const handlePostPublished = useCallback(
|
||||
@@ -84,7 +83,7 @@ export function ForumSpaceShell() {
|
||||
}
|
||||
selectPost(published.eventId, published.topicRoomId);
|
||||
},
|
||||
[insertThreadFromNewPost, selectPost]
|
||||
[insertThreadFromNewPost, selectPost],
|
||||
);
|
||||
|
||||
const handleReplySent = useCallback(
|
||||
@@ -93,13 +92,12 @@ export function ForumSpaceShell() {
|
||||
recordThreadReply(selectedPostId);
|
||||
}
|
||||
},
|
||||
[recordThreadReply, selectedPostId]
|
||||
[recordThreadReply, selectedPostId],
|
||||
);
|
||||
|
||||
const showThread = Boolean(selectedPostId && activeTopicRoom);
|
||||
|
||||
const threadInitialPost =
|
||||
optimisticPost?.eventId === selectedPostId ? optimisticPost : null;
|
||||
const threadInitialPost = optimisticPost?.eventId === selectedPostId ? optimisticPost : null;
|
||||
const detailDropRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
return (
|
||||
@@ -123,7 +121,11 @@ export function ForumSpaceShell() {
|
||||
</section>
|
||||
<section className={theme.ForumListCard}>
|
||||
{error && (
|
||||
<Text as="p" className={theme.ForumListLoading} style={{ color: color.Critical.Main }}>
|
||||
<Text
|
||||
as="p"
|
||||
className={theme.ForumListLoading}
|
||||
style={{ color: color.Critical.Main }}
|
||||
>
|
||||
{error}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user