I have literally lost track. Please save me, I am going crazy

This commit is contained in:
SethBurkart123
2024-04-22 12:58:02 +10:00
parent 3177e4bda2
commit 785cc54d39
4 changed files with 38 additions and 11 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ export const ThemeCover: React.FC<ThemeCoverProps> = ({
</div>
)}
{ !isEditMode || !downloaded &&
{ isEditMode || !downloaded &&
<>
<div
className="absolute z-20 flex w-8 h-8 p-2 text-white transition-all rounded-full delay-[20ms] opacity-0 top-1 right-2 dark:bg-black/50 place-items-center group-hover:opacity-100 group-hover:top-[1.25rem]"
@@ -59,6 +59,17 @@ const ThemeSelector: ForwardRefExoticComponent<Omit<ThemeSelectorProps, "ref"> &
setThemes(themes);
setDownloadedThemes(await getDownloadedThemes());
setSelectedTheme(selectedTheme ? selectedTheme : '');
const matchingThemes = themes.filter(theme => downloadedThemes.some((downloadedTheme: DownloadedTheme) => downloadedTheme.id === theme.id));
if (matchingThemes.length > 0) {
matchingThemes.forEach((theme) => {
browser.runtime.sendMessage({
type: 'DeleteDownloadedTheme',
body: theme.id
})
})
}
} catch (error) {
console.error('Error fetching themes:', error);
} finally {