From a43225066cae35afd8b51db4d3b5ffd068c3b0d2 Mon Sep 17 00:00:00 2001 From: prism Date: Sun, 7 Jun 2026 19:11:38 +0200 Subject: [PATCH] EquicordHelper: fix (#1147) * fix * bleh --- src/equicordplugins/equicordHelper/index.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/equicordplugins/equicordHelper/index.tsx b/src/equicordplugins/equicordHelper/index.tsx index 11d3e5998..40c29f84b 100644 --- a/src/equicordplugins/equicordHelper/index.tsx +++ b/src/equicordplugins/equicordHelper/index.tsx @@ -15,7 +15,7 @@ import { Devs, EquicordDevs, GUILD_ID, SUPPORT_CHANNEL_ID, SUPPORT_CHANNEL_IDS, import { isAnyPluginDev } from "@utils/misc"; import definePlugin, { OptionType } from "@utils/types"; import { StandingState } from "@vencord/discord-types/enums"; -import { findByCodeLazy, findStoreLazy } from "@webpack"; +import { extractAndLoadChunksLazy, findByCodeLazy, findStoreLazy } from "@webpack"; import { Alerts, ApplicationCommandIndexStore, NavigationRouter, React, SettingsRouter, UserGuildSettingsStore, UserStore, useStateFromStores, VoiceStateStore } from "@webpack/common"; import { ComponentType } from "react"; @@ -30,6 +30,7 @@ let clicked = false; const SafetyHubStore = findStoreLazy("SafetyHubStore"); const fetchSafetyHub: () => Promise = findByCodeLazy("SAFETY_HUB_FETCH_START"); +const requireSafetyHub = extractAndLoadChunksLazy(["USER_SETTINGS_MODAL_KEY"]); const StandingConfig: Record; }> = { [StandingState.ALL_GOOD]: { label: "All good!", hoverColor: "var(--status-positive)", Icon: ShieldIcon }, @@ -40,6 +41,14 @@ const StandingConfig: Record { requireSafetyHub().then(() => setLoaded(true)).catch(() => { }); }, []); + + return loaded ? : null; +} + +function AccountStandingButton() { const standing = useStateFromStores([SafetyHubStore], () => SafetyHubStore.getAccountStanding()); const isInitialized = useStateFromStores([SafetyHubStore], () => SafetyHubStore.isInitialized()); const [hovered, setHovered] = React.useState(false);