From cfca53773b420eb78ac9b492c7bb8351cb47d5bf Mon Sep 17 00:00:00 2001
From: Kalle <38327916+Sendouc@users.noreply.github.com>
Date: Tue, 24 Jun 2025 08:33:25 +0300
Subject: [PATCH] Fix can't reset custom CSS Closes #2349
---
app/components/CustomizedColorsInput.tsx | 14 ++++++++++----
e2e/user-page.spec.ts | 6 ++++--
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/app/components/CustomizedColorsInput.tsx b/app/components/CustomizedColorsInput.tsx
index 8c5f887af..d47a28b42 100644
--- a/app/components/CustomizedColorsInput.tsx
+++ b/app/components/CustomizedColorsInput.tsx
@@ -79,7 +79,13 @@ export function CustomizedColorsInput({
-
+
{CUSTOM_CSS_VAR_COLORS.filter(
(cssVar) => cssVar !== "bg-lightest",
@@ -112,9 +118,9 @@ export function CustomizedColorsInput({
...colors,
};
if (cssVar === "bg-lighter") {
- newColors["bg-lightest"] = defaultColors.find((color) => color["bg-lightest"])?.[
- "bg-lightest"
- ];
+ newColors["bg-lightest"] = defaultColors.find(
+ (color) => color["bg-lightest"],
+ )?.["bg-lightest"];
}
setColors({
...newColors,
diff --git a/e2e/user-page.spec.ts b/e2e/user-page.spec.ts
index cd59deafe..38d0cc790 100644
--- a/e2e/user-page.spec.ts
+++ b/e2e/user-page.spec.ts
@@ -151,8 +151,10 @@ test.describe("User page", () => {
await goToEditPage(page);
await page.locator("span").filter({ hasText: "Custom colors" }).click();
- for (const button of await page.getByRole("button", { name: "Reset" }).all()) {
- await button.click();
+ for (const button of await page
+ .getByRole("button", { name: "Reset" })
+ .all()) {
+ await button.click();
}
await submitEditForm(page);