feat: adding hydra shop constant

This commit is contained in:
Chubby Granny Chaser 2025-02-16 19:28:28 +00:00
parent 74c7668510
commit cd48acc7e6
No known key found for this signature in database
4 changed files with 7 additions and 4 deletions

View file

@ -14,3 +14,5 @@ export const DOWNLOADER_NAME = {
};
export const MAX_MINUTES_TO_SHOW_IN_PLAYTIME = 120;
export const WEB_STORE_URL = "https://hydrathemes.shop";

View file

@ -4,8 +4,7 @@ import { useTranslation } from "react-i18next";
import { AddThemeModal, DeleteAllThemesModal } from "../index";
import "./theme-actions.scss";
import { useState } from "react";
export const WEB_STORE_URL = "https://hydrathemes.shop";
import { WEB_STORE_URL } from "@renderer/constants";
interface ThemeActionsProps {
onListUpdated: () => void;

View file

@ -7,6 +7,7 @@ import "./theme-card.scss";
import { useState } from "react";
import { DeleteThemeModal } from "../modals/delete-theme-modal";
import { injectCustomCss, removeCustomCss } from "@renderer/helpers";
import { WEB_STORE_URL } from "@renderer/constants";
interface ThemeCardProps {
theme: Theme;
@ -103,7 +104,7 @@ export const ThemeCard = ({ theme, onListUpdated }: ThemeCardProps) => {
<div className="theme-card__actions__right">
<Button
className={
theme.code.startsWith("https://hydrathemes.shop/")
theme.code.startsWith(WEB_STORE_URL)
? "theme-card__actions__right--external"
: ""
}

View file

@ -6,6 +6,7 @@ import { Theme } from "@types";
import { injectCustomCss, removeCustomCss } from "@renderer/helpers";
import { useToast } from "@renderer/hooks";
import { UserProfile } from "@types";
import { WEB_STORE_URL } from "@renderer/constants";
interface ImportThemeModalProps {
visible: boolean;
onClose: () => void;
@ -36,7 +37,7 @@ export const ImportThemeModal = ({
isActive: false,
author: author?.id,
authorName: author?.displayName,
code: `https://hydrathemes.shop/themes/${themeName}.css`,
code: `${WEB_STORE_URL}/themes/${themeName}/theme.css`,
createdAt: new Date(),
updatedAt: new Date(),
};