mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
Merge branch 'chore/inbox-advisor-sidebar' of https://github.com/supabase/supabase into chore/inbox-advisor-sidebar
This commit is contained in:
commit
0e56b4659c
1 file changed
+3
-2
@@ -154,9 +154,10 @@ export const useRegisterSidebar = (
|
||||
const { sidebars, registerSidebar, unregisterSidebar } = useSidebarManagerSnapshot()
|
||||
|
||||
useEffect(() => {
|
||||
if (!sidebars[id] && enabled) {
|
||||
const isEnabled = enabled !== false;
|
||||
if (!sidebars[id] && isEnabled) {
|
||||
registerSidebar(id, component, handlers)
|
||||
} else if (sidebars[id] && !enabled) {
|
||||
} else if (sidebars[id] && !isEnabled) {
|
||||
unregisterSidebar(id)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user