fix build

This commit is contained in:
bkellam 2025-07-24 12:13:06 -07:00
parent e150310c98
commit 732505be0e

View file

@ -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">