diff --git a/src/plugins/dayNightSwitcher/index.tsx b/src/plugins/dayNightSwitcher/index.tsx index 4865ba470..dbd57a711 100644 --- a/src/plugins/dayNightSwitcher/index.tsx +++ b/src/plugins/dayNightSwitcher/index.tsx @@ -1,4 +1,10 @@ -import { definePluginSettings, Settings } from "@api/Settings"; +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { definePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import { OptionType } from "@utils/types"; import definePlugin from "@utils/types"; @@ -9,18 +15,18 @@ const settings = definePluginSettings({ type: OptionType.NUMBER, description: "Day Theme Start Time (Hour)", default: 8, // Default: 8 AM - isValid: (value) => value >= 0 && value <= 23 || "Must be a valid hour (0-23)" + isValid: value => value >= 0 && value <= 23 || "Must be a valid hour (0-23)" }, nightTime: { type: OptionType.NUMBER, description: "Night Theme Start Time (Hour)", default: 20, // Default: 8 PM - isValid: (value) => value >= 0 && value <= 23 || "Must be a valid hour (0-23)" + isValid: value => value >= 0 && value <= 23 || "Must be a valid hour (0-23)" } }); function setTheme(theme: "light" | "dark") { - const body = document.body; + const { body } = document; if (theme === "light") { body.classList.remove("theme-dark"); body.classList.add("theme-light");