Skip to content

Commit 18800d0

Browse files
committed
fix(ui): useSearchParams needs to be wrapped into Suspense
Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
1 parent bc77455 commit 18800d0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

apps/beeai-ui/src/components/MainContentView/MainContentView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6+
'use client';
7+
68
import clsx from 'clsx';
79
import type { PropsWithChildren } from 'react';
810
import { mergeRefs } from 'react-merge-refs';

apps/beeai-ui/src/components/layouts/AppLayout.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import type { PropsWithChildren } from 'react';
6+
import { type PropsWithChildren, Suspense } from 'react';
77

88
import { AppHeader } from '#components/AppHeader/AppHeader.tsx';
99
import { AgentDetailPanel } from '#modules/agents/components/AgentDetailPanel.tsx';
@@ -13,12 +13,16 @@ import classes from './AppLayout.module.scss';
1313
export function AppLayout({ children }: PropsWithChildren) {
1414
return (
1515
<div className={classes.root}>
16-
<AppHeader className={classes.header} />
16+
<Suspense>
17+
<AppHeader className={classes.header} />
18+
</Suspense>
1719

1820
<main className={classes.main} data-route-transition>
1921
{children}
2022

21-
<AgentDetailPanel />
23+
<Suspense>
24+
<AgentDetailPanel />
25+
</Suspense>
2226
</main>
2327
</div>
2428
);

0 commit comments

Comments
 (0)