diff --git a/frontend/src/components/AssetGallery.tsx b/frontend/src/components/AssetGallery.tsx index 33bddbc..695e1ec 100644 --- a/frontend/src/components/AssetGallery.tsx +++ b/frontend/src/components/AssetGallery.tsx @@ -1,4 +1,5 @@ import { useEffect, useState, useMemo } from 'react' +import { createPortal } from 'react-dom' import { getRecentAssets } from '../api/generate' import type { RecentAssetItem } from '../api/types' @@ -40,7 +41,7 @@ function matchCategory(item: RecentAssetItem, cat: string): boolean { function DetailModal({ item, onClose }: { item: RecentAssetItem; onClose: () => void }) { const downloadUrl = `/api/v1/assets/download?key=${encodeURIComponent(item.key)}` - return ( + return createPortal(
- + , + document.body ) }