From 97bb3fa4c879cf2a517e59b1f7177c9e49e0a692 Mon Sep 17 00:00:00 2001
From: AAGaming <aa@mail.catvibers.me>
Date: Wed, 22 Feb 2023 22:00:23 -0500
Subject: Fix loader on feb 22 2023 beta

---
 frontend/src/components/QuickAccessVisibleState.tsx | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

(limited to 'frontend/src/components/QuickAccessVisibleState.tsx')

diff --git a/frontend/src/components/QuickAccessVisibleState.tsx b/frontend/src/components/QuickAccessVisibleState.tsx
index 09babe84..ef977442 100644
--- a/frontend/src/components/QuickAccessVisibleState.tsx
+++ b/frontend/src/components/QuickAccessVisibleState.tsx
@@ -4,15 +4,11 @@ const QuickAccessVisibleState = createContext<boolean>(true);
 
 export const useQuickAccessVisible = () => useContext(QuickAccessVisibleState);
 
-export const QuickAccessVisibleStateProvider: FC<{ initial: boolean; setter: ((val: boolean) => {}[]) | never[] }> = ({
-  children,
-  initial,
-  setter,
-}) => {
+export const QuickAccessVisibleStateProvider: FC<{ initial: boolean; tab: any }> = ({ children, initial, tab }) => {
   const [visible, setVisible] = useState<boolean>(initial);
   const [prev, setPrev] = useState<boolean>(initial);
-  // hack to use an array as a "pointer" to pass the setter up the tree
-  setter[0] = setVisible;
+  // HACK but i can't think of a better way to do this
+  tab.qAMVisibilitySetter = setVisible;
   if (initial != prev) {
     setPrev(initial);
     setVisible(initial);
-- 
cgit v1.2.3

