Skip to content
Snippets Groups Projects
Unverified Commit 97080a36 authored by Hugo Costa's avatar Hugo Costa Committed by GitHub
Browse files

regression: UiKitMessage invalidates room (#31603)

parent 7d17f103
No related branches found
No related tags found
No related merge requests found
import type { IMessage, IRoom } from '@rocket.chat/core-typings';
import { MessageBlock } from '@rocket.chat/fuselage';
import { MessageBlock, Skeleton } from '@rocket.chat/fuselage';
import { UiKitComponent, UiKitMessage as UiKitMessageSurfaceRender, UiKitContext } from '@rocket.chat/fuselage-ui-kit';
import type { MessageSurfaceLayout } from '@rocket.chat/ui-kit';
import React from 'react';
import React, { Suspense } from 'react';
import { useMessageBlockContextValue } from '../../../uikit/hooks/useMessageBlockContextValue';
import GazzodownText from '../../GazzodownText';
......@@ -20,7 +20,9 @@ const UiKitMessageBlock = ({ rid, mid, blocks }: UiKitMessageBlockProps) => {
<MessageBlock fixedWidth>
<UiKitContext.Provider value={contextValue}>
<GazzodownText>
<UiKitComponent render={UiKitMessageSurfaceRender} blocks={blocks} />
<Suspense fallback={<Skeleton />}>
<UiKitComponent render={UiKitMessageSurfaceRender} blocks={blocks} />
</Suspense>
</GazzodownText>
</UiKitContext.Provider>
</MessageBlock>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment