fix: fixing submit on new theme

This commit is contained in:
Chubby Granny Chaser 2025-02-16 19:42:28 +00:00
parent 6e35600ffe
commit 21684ef6b1
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -54,7 +54,7 @@ export function AddThemeModal({
isActive: false,
author: userDetails?.id,
authorName: userDetails?.username,
code: "",
code: "/* Your theme goes here */",
createdAt: new Date(),
updatedAt: new Date(),
};
@ -86,7 +86,7 @@ export function AddThemeModal({
error={errors.name?.message}
/>
<Button theme="primary" disabled={isSubmitting}>
<Button type="submit" theme="primary" disabled={isSubmitting}>
{t("create_theme")}
</Button>
</form>

View file

@ -6,6 +6,7 @@ import { Theme, UserProfile } from "@types";
import { injectCustomCss, removeCustomCss } from "@renderer/helpers";
import { useToast } from "@renderer/hooks";
import { THEME_WEB_STORE_URL } from "@renderer/constants";
import { logger } from "@renderer/logger";
interface ImportThemeModalProps {
visible: boolean;
@ -65,7 +66,7 @@ export const ImportThemeModal = ({
showSuccessToast(t("theme_imported"));
onClose();
} catch (error) {
console.error(error);
logger.error(error);
showErrorToast(t("error_importing_theme"));
onClose();
}