Type the crypto, settings, and component any sites. [skip build]
This commit is contained in:
@@ -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],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user