From 75646d7fd53d5fbe854026073d04b45cd0cf63eb Mon Sep 17 00:00:00 2001 From: MiguVT Date: Mon, 16 Sep 2024 16:02:28 +0200 Subject: [PATCH] small fixes --- src/plugins/dayNightSwitcher/index.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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");