website refactor

This commit is contained in:
2026-01-18 13:26:35 +01:00
parent 350c78504d
commit 0b301feb61
225 changed files with 1678 additions and 26666 deletions

View File

@@ -0,0 +1,24 @@
import React, { useState } from 'react';
import { Image as UiImage } from '@/ui/Image';
interface SafeImageProps extends React.ComponentProps<typeof UiImage> {
fallbackComponent?: React.ReactNode;
}
export function SafeImage({ fallbackComponent, ...props }: SafeImageProps) {
const [error, setError] = useState(false);
if (error && fallbackComponent) {
return <>{fallbackComponent}</>;
}
return (
<UiImage
{...props}
onError={(e) => {
setError(true);
props.onError?.(e);
}}
/>
);
}