Skip to content

Commit 732505b

Browse files
fix build
1 parent e150310 commit 732505b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/web/src/features/chat/components/chatThread/errorBanner.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ interface ErrorBannerProps {
1212
}
1313

1414
export const ErrorBanner = ({ error, isVisible, onClose }: ErrorBannerProps) => {
15-
if (!isVisible) {
16-
return null;
17-
}
18-
1915
const errorMessage = useMemo(() => {
2016
try {
2117
const errorJson = JSON.parse(error.message);
@@ -26,6 +22,10 @@ export const ErrorBanner = ({ error, isVisible, onClose }: ErrorBannerProps) =>
2622
}
2723
}, [error]);
2824

25+
if (!isVisible) {
26+
return null;
27+
}
28+
2929
return (
3030
<div className="bg-red-50 border-b border-red-200 dark:bg-red-950/20 dark:border-red-800">
3131
<div className="max-w-5xl mx-auto px-4 py-3">

0 commit comments

Comments
 (0)