fix: ErrorBoundary autour de ImagesPage pour capturer crash IA
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user