diff --git a/interface/src/components/BackgroundSelector.tsx b/interface/src/components/BackgroundSelector.tsx index a11a5629..1f9a2c66 100644 --- a/interface/src/components/BackgroundSelector.tsx +++ b/interface/src/components/BackgroundSelector.tsx @@ -87,7 +87,14 @@ export default function BackgroundSelector({ selectedType, setSelectedType, isEd store.delete(fileId); setBackgrounds(prev => prev.filter(bg => bg.id !== fileId)); - // Check if the background being deleted is currently selected + swatch + + ))} + {backgrounds.concat(presetBackgrounds as Background[]).filter(bg => bg.type === 'image' && bg.isPreset && !bg.isDownloaded && !downloadedPresetIds.includes(bg.id)).map(bg => ( if (fileId === selectedBackground) { selectNoBackground(); // Disable the current background } @@ -123,16 +130,24 @@ export default function BackgroundSelector({ selectedType, setSelectedType, isEd {backgrounds.filter(bg => bg.type === 'image').map(bg => ( -
selectBackground(bg.id)} - className={`relative w-16 h-16 cursor-pointer rounded-xl transition ring dark:ring-white ring-zinc-300 ${isEditMode ? 'animate-shake' : ''} ${selectedBackground === bg.id && selectedType === "background" ? 'dark:ring-2 ring-4' : 'ring-0'}`}> + className={`relative w-16 h-16 cursor-pointer rounded-xl transition ring dark:ring-white ring-zinc-300 ${isEditMode ? 'animate-shake' : ''} ${selectedBackground === bg.id && selectedType === "background" ? 'dark:ring-2 ring-4' : 'ring-0'}`} + > {isEditMode && ( -
deleteBackground(bg.id)}> +
deleteBackground(bg.id)} + >
)} - swatch + swatch
))} {backgrounds.concat(presetBackgrounds as Background[]).filter(bg => bg.type === 'image' && bg.isPreset && !bg.isDownloaded && !downloadedPresetIds.includes(bg.id)).map(bg => (