mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: fixing submit on new theme
This commit is contained in:
parent
6e35600ffe
commit
21684ef6b1
2 changed files with 4 additions and 3 deletions
|
@ -54,7 +54,7 @@ export function AddThemeModal({
|
||||||
isActive: false,
|
isActive: false,
|
||||||
author: userDetails?.id,
|
author: userDetails?.id,
|
||||||
authorName: userDetails?.username,
|
authorName: userDetails?.username,
|
||||||
code: "",
|
code: "/* Your theme goes here */",
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
};
|
};
|
||||||
|
@ -86,7 +86,7 @@ export function AddThemeModal({
|
||||||
error={errors.name?.message}
|
error={errors.name?.message}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button theme="primary" disabled={isSubmitting}>
|
<Button type="submit" theme="primary" disabled={isSubmitting}>
|
||||||
{t("create_theme")}
|
{t("create_theme")}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { Theme, UserProfile } from "@types";
|
||||||
import { injectCustomCss, removeCustomCss } from "@renderer/helpers";
|
import { injectCustomCss, removeCustomCss } from "@renderer/helpers";
|
||||||
import { useToast } from "@renderer/hooks";
|
import { useToast } from "@renderer/hooks";
|
||||||
import { THEME_WEB_STORE_URL } from "@renderer/constants";
|
import { THEME_WEB_STORE_URL } from "@renderer/constants";
|
||||||
|
import { logger } from "@renderer/logger";
|
||||||
|
|
||||||
interface ImportThemeModalProps {
|
interface ImportThemeModalProps {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
@ -65,7 +66,7 @@ export const ImportThemeModal = ({
|
||||||
showSuccessToast(t("theme_imported"));
|
showSuccessToast(t("theme_imported"));
|
||||||
onClose();
|
onClose();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
logger.error(error);
|
||||||
showErrorToast(t("error_importing_theme"));
|
showErrorToast(t("error_importing_theme"));
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue