Skip to content

Commit 0376592

Browse files
committed
Fixed theme save
1 parent 9b9d2dd commit 0376592

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

apps/web/components/admin/page-editor/theme-editor/index.tsx

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import React, {
66
useRef,
77
} from "react";
88
import { ExpandMoreRight } from "@courselit/icons";
9-
import { Sun, Moon } from "lucide-react";
109
import { ColorSelector } from "@courselit/components-library";
1110
import { capitalize, FetchBuilder, truncate } from "@courselit/utils";
1211
import {
@@ -261,7 +260,6 @@ const colorCategories = [
261260
{ name: "shadow2xs", displayName: "Shadow 2XS" },
262261
{ name: "shadowXs", displayName: "Shadow XS" },
263262
{ name: "shadowSm", displayName: "Shadow SM" },
264-
{ name: "shadow", displayName: "Shadow" },
265263
{ name: "shadowMd", displayName: "Shadow MD" },
266264
{ name: "shadowLg", displayName: "Shadow LG" },
267265
{ name: "shadowXl", displayName: "Shadow XL" },
@@ -992,35 +990,6 @@ function ThemeEditor({
992990
.label
993991
}
994992
</span>
995-
{navigationStack[navigationStack.length - 1].id ===
996-
"colors" && (
997-
<button
998-
className={`relative w-12 h-6 rounded-full transition-colors duration-200 focus:outline-none ${nextTheme === "dark" ? "bg-gray-600" : "bg-gray-300"}`}
999-
onClick={() => {
1000-
setNextTheme(
1001-
nextTheme === "dark"
1002-
? "light"
1003-
: "dark",
1004-
);
1005-
}}
1006-
aria-label="Toggle color mode"
1007-
type="button"
1008-
>
1009-
<span
1010-
className={`absolute top-0 left-0 w-6 h-6 rounded-full flex items-center justify-center transition-transform duration-200 ${nextTheme === "dark" ? "translate-x-6 bg-zinc-900" : "translate-x-0 bg-white"}`}
1011-
style={{
1012-
boxShadow:
1013-
"0 1px 4px rgba(0,0,0,0.15)",
1014-
}}
1015-
>
1016-
{nextTheme === "dark" ? (
1017-
<Moon className="w-4 h-4 text-white" />
1018-
) : (
1019-
<Sun className="w-4 h-4 text-yellow-500" />
1020-
)}
1021-
</span>
1022-
</button>
1023-
)}
1024993
</div>
1025994
</div>
1026995
<div className="py-2">{getCurrentView()}</div>

apps/web/models/Theme.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const ColorsSchema = new mongoose.Schema(
5151
shadow2xs: { type: String, required: true },
5252
shadowXs: { type: String, required: true },
5353
shadowSm: { type: String, required: true },
54-
shadow: { type: String, required: true },
5554
shadowMd: { type: String, required: true },
5655
shadowLg: { type: String, required: true },
5756
shadowXl: { type: String, required: true },

0 commit comments

Comments
 (0)