Skip to content

Commit

Permalink
🐛 fix: fix portal suspense error when first open (#5322)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Jan 7, 2025
1 parent 758ade2 commit 0d4c487
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/(main)/chat/(workspace)/_layout/Desktop/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { Suspense } from 'react';
import { Flexbox } from 'react-layout-kit';

import BrandTextLoading from '@/components/Loading/BrandTextLoading';

import { LayoutProps } from '../type';
import ChatHeader from './ChatHeader';
import HotKeys from './HotKeys';
Expand All @@ -24,7 +27,9 @@ const Layout = ({ children, topic, conversation, portal }: LayoutProps) => {
{conversation}
</Flexbox>
{children}
<Portal>{portal}</Portal>
<Portal>
<Suspense fallback={<BrandTextLoading />}>{portal}</Suspense>
</Portal>
<TopicPanel>{topic}</TopicPanel>
</Flexbox>
<HotKeys />
Expand Down

0 comments on commit 0d4c487

Please sign in to comment.