Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: Hide marketplace link from Plugin List when market disabled (#9929)

Michael Webbe303979e0feb
diff --git a/src/features/AgentSetting/AgentPlugin/index.tsx b/src/features/AgentSetting/AgentPlugin/index.tsx
index e11f2484747..c7f89268e3c 100644
--- a/src/features/AgentSetting/AgentPlugin/index.tsx
+++ b/src/features/AgentSetting/AgentPlugin/index.tsx
@@ -34,7 +34,7 @@ const AgentPlugin = memo(() => {
s.toggleAgentPlugin,
]);
- const { showDalle } = useServerConfigStore(featureFlagsSelectors);
+ const { showDalle, showMarket } = useServerConfigStore(featureFlagsSelectors);
const installedPlugins = useToolStore(toolSelectors.metaList(showDalle), isEqual);
const { isLoading } = useFetchInstalledPlugins();
@@ -112,16 +112,18 @@ const AgentPlugin = memo(() => {
/>
</Tooltip>
) : null}
- <Tooltip title={t('plugin.store')}>
- <Button
- icon={Store}
- onClick={(e) => {
- e.stopPropagation();
- setShowStore(true);
- }}
- size={'small'}
- />
- </Tooltip>
+ {showMarket ? (
+ <Tooltip title={t('plugin.store')}>
+ <Button
+ icon={Store}
+ onClick={(e) => {
+ e.stopPropagation();
+ setShowStore(true);
+ }}
+ size={'small'}
+ />
+ </Tooltip>
+ ) : null}
</Space.Compact>
);
@@ -149,7 +151,13 @@ const AgentPlugin = memo(() => {
);
const plugin: FormGroupItemType = {
- children: isLoading ? loadingSkeleton : isEmpty ? empty : [...deprecatedList, ...list],
+ children: isLoading
+ ? loadingSkeleton
+ : isEmpty
+ ? showMarket
+ ? empty
+ : []
+ : [...deprecatedList, ...list],
extra,
title: t('settingPlugin.title'),
};