Type the crypto, settings, and component any sites. [skip build]
Checks / checks (push) Successful in 2m4s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-02 03:56:07 +11:00
parent 6c8a085ae1
commit 9d17b14a9e
26 changed files with 68 additions and 49 deletions
+4 -3
View File
@@ -13,10 +13,11 @@ import {
Spinner,
toRem,
} from 'folds';
import { EventType } from 'matrix-js-sdk';
import { Icon, Icons } from '../../components/icons';
import { HierarchyItem } from '../../hooks/useSpaceHierarchy';
import { useMatrixClient } from '../../hooks/useMatrixClient';
import { MSpaceChildContent, StateEvent } from '../../../types/matrix/room';
import { MSpaceChildContent } from '../../../types/matrix/room';
import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback';
import { UseStateProvider } from '../../components/UseStateProvider';
import { LeaveSpacePrompt } from '../../components/leave-space-prompt';
@@ -47,7 +48,7 @@ function SuggestMenuItem({
const [toggleState, handleToggleSuggested] = useAsyncCallback(
useCallback(() => {
const newContent: MSpaceChildContent = { ...content, suggested: !content.suggested };
return mx.sendStateEvent(parentId, StateEvent.SpaceChild as any, newContent, roomId);
return mx.sendStateEvent(parentId, EventType.SpaceChild, newContent, roomId);
}, [mx, parentId, roomId, content]),
);
@@ -84,7 +85,7 @@ function RemoveMenuItem({
const [removeState, handleRemove] = useAsyncCallback(
useCallback(
() => mx.sendStateEvent(parentId, StateEvent.SpaceChild as any, {}, roomId),
() => mx.sendStateEvent(parentId, EventType.SpaceChild, {}, roomId),
[mx, parentId, roomId],
),
);