fix: ErrorBoundary autour de ImagesPage pour capturer crash IA

This commit is contained in:
2026-06-09 13:19:45 +02:00
parent 4b9db5bebf
commit 1f8db29b15
+10 -1
View File
@@ -5,10 +5,11 @@ import { DropZone } from '@/components/images/DropZone'
import { ImageCard } from '@/components/images/ImageCard'
import { Lightbox } from '@/components/images/Lightbox'
import { GlobalActions } from '@/components/images/GlobalActions'
import { ErrorBoundary } from '@/components/common/ErrorBoundary'
import { useImages } from '@/hooks/useImages'
import type { ImageItem } from '@/types/images'
export default function ImagesPage() {
function ImagesPageInner() {
const { items, addFiles, setFeather, rotate, uploadOne, uploadAll, removeItem } = useImages()
const [lightboxItem, setLightboxItem] = useState<ImageItem | null>(null)
@@ -59,3 +60,11 @@ export default function ImagesPage() {
</>
)
}
export default function ImagesPage() {
return (
<ErrorBoundary>
<ImagesPageInner />
</ErrorBoundary>
)
}