mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +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) => {
|
export const ErrorBanner = ({ error, isVisible, onClose }: ErrorBannerProps) => {
|
||||||
if (!isVisible) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const errorMessage = useMemo(() => {
|
const errorMessage = useMemo(() => {
|
||||||
try {
|
try {
|
||||||
const errorJson = JSON.parse(error.message);
|
const errorJson = JSON.parse(error.message);
|
||||||
|
|
@ -26,6 +22,10 @@ export const ErrorBanner = ({ error, isVisible, onClose }: ErrorBannerProps) =>
|
||||||
}
|
}
|
||||||
}, [error]);
|
}, [error]);
|
||||||
|
|
||||||
|
if (!isVisible) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-red-50 border-b border-red-200 dark:bg-red-950/20 dark:border-red-800">
|
<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">
|
<div className="max-w-5xl mx-auto px-4 py-3">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue