mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-11 20:05:25 +00:00
fix build
This commit is contained in:
parent
e150310c98
commit
732505be0e
1 changed files with 4 additions and 4 deletions
|
|
@ -12,10 +12,6 @@ interface ErrorBannerProps {
|
|||
}
|
||||
|
||||
export const ErrorBanner = ({ error, isVisible, onClose }: ErrorBannerProps) => {
|
||||
if (!isVisible) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const errorMessage = useMemo(() => {
|
||||
try {
|
||||
const errorJson = JSON.parse(error.message);
|
||||
|
|
@ -26,6 +22,10 @@ export const ErrorBanner = ({ error, isVisible, onClose }: ErrorBannerProps) =>
|
|||
}
|
||||
}, [error]);
|
||||
|
||||
if (!isVisible) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="bg-red-50 border-b border-red-200 dark:bg-red-950/20 dark:border-red-800">
|
||||
<div className="max-w-5xl mx-auto px-4 py-3">
|
||||
|
|
|
|||
Loading…
Reference in a new issue