diff --git a/src/equicordplugins/themeLibrary/components/ThemeInfoModal.tsx b/src/equicordplugins/themeLibrary/components/ThemeInfoModal.tsx index 5954c06e..1d8fb233 100644 --- a/src/equicordplugins/themeLibrary/components/ThemeInfoModal.tsx +++ b/src/equicordplugins/themeLibrary/components/ThemeInfoModal.tsx @@ -9,29 +9,17 @@ import { Heart } from "@components/Heart"; import { copyToClipboard } from "@utils/clipboard"; import { openInviteModal } from "@utils/discord"; import { Margins } from "@utils/margins"; -import { classes } from "@utils/misc"; import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal"; import type { PluginNative } from "@utils/types"; import { findComponentByCodeLazy } from "@webpack"; import { Button, Forms, Parser, React, showToast, Toasts } from "@webpack/common"; -import { Theme, ThemeInfoModalProps } from "../types"; -import { ClockIcon, DownloadIcon, WarningIcon } from "../utils/Icons"; -import { logger } from "./ThemeTab"; +import { ThemeInfoModalProps } from "../types"; +import { ClockIcon, WarningIcon } from "../utils/Icons"; const Native = VencordNative.pluginHelpers.ThemeLibrary as PluginNative; const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers"); -async function downloadTheme(themesDir: string, theme: Theme) { - try { - await Native.downloadTheme(themesDir, theme); - showToast(`Downloaded ${theme.name}!`, Toasts.Type.SUCCESS); - } catch (err: unknown) { - logger.error(err); - showToast(`Failed to download ${theme.name}! (check console)`, Toasts.Type.FAILURE); - } -} - export const ThemeInfoModal: React.FC = ({ author, theme, ...props }) => { const { type, content, likes, guild, tags, last_updated, requiresThemeAttributes } = theme; @@ -189,68 +177,6 @@ export const ThemeInfoModal: React.FC = ({ author, theme, . > Close - - - - - )); - } else { - await downloadTheme(themesDir, theme); - } - }} - > -
- Download -
- );