From d4897e99610e51298754786baca7eb4e0e25d314 Mon Sep 17 00:00:00 2001 From: Mohammed <88824957+majhcc@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:40:15 +0400 Subject: [PATCH] Fix code formatting and update themes --- islands/Editor.tsx | 1 - islands/ThemeToggle.tsx | 2 +- routes/api/test/finsh.ts | 2 +- tailwind.config.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/islands/Editor.tsx b/islands/Editor.tsx index 431b71e..1deb03c 100644 --- a/islands/Editor.tsx +++ b/islands/Editor.tsx @@ -57,7 +57,6 @@ export default function Editor(props: EditorProps) { try { eval(props.testingCode); if (isPass) { - let courseSlug: string; // THIS FOR DEV MODE ONLY IT WILL BE REMOVED IN PRODUCTION // if (props.slug.includes("/")) { diff --git a/islands/ThemeToggle.tsx b/islands/ThemeToggle.tsx index a10c0a2..6f0b73e 100644 --- a/islands/ThemeToggle.tsx +++ b/islands/ThemeToggle.tsx @@ -32,7 +32,7 @@ export default function ThemeToggle() { const handleThemeChange = () => { const storedTheme = localStorage.getItem("selectedTheme"); - const newTheme = storedTheme === "cmyk" ? "dracula" : "cmyk"; + const newTheme = storedTheme === "cmyk" ? "night" : "cmyk"; document.documentElement.setAttribute("data-theme", newTheme); localStorage.setItem("selectedTheme", newTheme); updateMarkdownTheme(newTheme); diff --git a/routes/api/test/finsh.ts b/routes/api/test/finsh.ts index 82c807d..97ba66e 100644 --- a/routes/api/test/finsh.ts +++ b/routes/api/test/finsh.ts @@ -13,7 +13,7 @@ export const handler: Handlers = { if (!sessionId) { return new Response("no sessionId", { status: 400 }) } - const res = await addCompletedCourse(sessionId, courseslug) + const res = await addCompletedCourse(sessionId, courseslug.replace("/", "\\")) if (!res.ok) { return new Response("error", { status: 400 }) } diff --git a/tailwind.config.ts b/tailwind.config.ts index 6036409..d72c909 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -11,6 +11,6 @@ export default { plugins: [daisyui], daisyui: { log: false, - themes: ["dracula", "cmyk"], + themes: ["night", "cmyk"], }, } satisfies Config;