From 13489a4145606dbde927fb697efb73be732aefc0 Mon Sep 17 00:00:00 2001 From: dvelo <52332868+DeveloLongScript@users.noreply.github.com> Date: Sat, 25 Jan 2025 10:28:21 -0600 Subject: [PATCH 1/3] feat: remove snow --- src/components/CommandBar.tsx | 2 - src/components/ServerCustomize.tsx | 2 +- src/components/misc/SnowfallController.tsx | 59 ---------------------- 3 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 src/components/misc/SnowfallController.tsx diff --git a/src/components/CommandBar.tsx b/src/components/CommandBar.tsx index 7345b2c..51c6e20 100644 --- a/src/components/CommandBar.tsx +++ b/src/components/CommandBar.tsx @@ -68,7 +68,6 @@ import { } from "@/lib/api"; import IconDisplay from "./IconDisplay"; import ServerSingle from "@/lib/single"; -import SnowfallController from "./misc/SnowfallController"; import { toast } from "sonner"; import { ServerResponse, OnlineServer } from "@/lib/types/mh-server"; import { @@ -856,7 +855,6 @@ export function CommandBarer() { - ); } diff --git a/src/components/ServerCustomize.tsx b/src/components/ServerCustomize.tsx index 8027a87..abcb363 100644 --- a/src/components/ServerCustomize.tsx +++ b/src/components/ServerCustomize.tsx @@ -140,7 +140,7 @@ export default function ServerCustomize({ }); }); }); - }, [isSignedIn]); + }, [isSignedIn, server]); const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { diff --git a/src/components/misc/SnowfallController.tsx b/src/components/misc/SnowfallController.tsx deleted file mode 100644 index 31b1e29..0000000 --- a/src/components/misc/SnowfallController.tsx +++ /dev/null @@ -1,59 +0,0 @@ -/* - * MHSF, Minehut Server List - * All external content is rather licensed under the ECA Agreement - * located here: https://mhsf.app/docs/legal/external-content-agreement - * - * All code under MHSF is licensed under the MIT License - * by open source contributors - * - * Copyright (c) 2024 dvelo - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -"use client"; -import { CommandEvents } from "@/lib/commandEvent"; -import { useEffect, useState } from "react"; -import Snowfall from "react-snowfall"; - -export const snowfallEvents = new CommandEvents(); -export default function SnowfallController() { - const [visible, setVisible] = useState(true); - - useEffect(() => { - snowfallEvents.on("toggle", () => { - setVisible(!visible); - }); - }, [visible]); - - return ( - <> - {visible && ( - - )} - - ); -} From 00f8a1f33e422f7c1f8fe063434554eae3feca9e Mon Sep 17 00:00:00 2001 From: dvelo <52332868+DeveloLongScript@users.noreply.github.com> Date: Sat, 25 Jan 2025 10:40:56 -0600 Subject: [PATCH 2/3] fix: remove snow topbar items as well --- src/components/clerk/Topbar.tsx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/components/clerk/Topbar.tsx b/src/components/clerk/Topbar.tsx index 3616615..edf2ab3 100644 --- a/src/components/clerk/Topbar.tsx +++ b/src/components/clerk/Topbar.tsx @@ -39,7 +39,6 @@ import { CloudSnow, InfoIcon } from "lucide-react"; import LoggedInPopover from "./LoggedInPopover"; import SignInPopoverButton from "./SignInPopoverButton"; import InfoPopover from "../misc/InfoPopover"; -import { snowfallEvents } from "../misc/SnowfallController"; export default function TopBar({ inter }: { inter: string }) { const clerk = useClerk(); @@ -50,14 +49,6 @@ export default function TopBar({ inter }: { inter: string }) {
-