mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 01:48:04 +08:00
Revert "refactor!: replace Zustand global store with TanStack Query for systemFeatures"
This reverts commit 806ece9a67.
This commit is contained in:
@ -13,7 +13,7 @@ import {
|
||||
createContext,
|
||||
useContextSelector,
|
||||
} from 'use-context-selector'
|
||||
import { useSystemFeatures } from '@/hooks/use-global-public'
|
||||
import { useGlobalPublicStore } from '@/context/global-public-context'
|
||||
import { PLUGIN_PAGE_TABS_MAP, usePluginPageTabs } from '../hooks'
|
||||
|
||||
export type PluginPageContextValue = {
|
||||
@ -63,7 +63,7 @@ export const PluginPageContextProvider = ({
|
||||
})
|
||||
const [currentPluginID, setCurrentPluginID] = useState<string | undefined>()
|
||||
|
||||
const { enable_marketplace } = useSystemFeatures()
|
||||
const { enable_marketplace } = useGlobalPublicStore(s => s.systemFeatures)
|
||||
const tabs = usePluginPageTabs()
|
||||
const options = useMemo(() => {
|
||||
return enable_marketplace ? tabs : tabs.filter(tab => tab.value !== PLUGIN_PAGE_TABS_MAP.marketplace)
|
||||
|
||||
Reference in New Issue
Block a user