fix(claude-code): refresh skills list after adding a marketplace

Sync and delete already refetched both the marketplaces and skills
lists; add only refetched marketplaces, so newly-imported skills
didn't show up in the Skills table until a manual page reload.
This commit is contained in:
Krrish Dholakia 2026-07-10 21:20:52 -07:00
parent 70ebd97def
commit 828a44ab26

View file

@ -78,6 +78,11 @@ const ClaudeCodePluginsPanel: React.FC<ClaudeCodePluginsPanelProps> = ({ accessT
fetchMarketplaces();
}, [accessToken]);
const handleMarketplaceAdded = () => {
fetchMarketplaces();
fetchPlugins();
};
const handleDeleteClick = (pluginName: string, displayName: string) => {
setPluginToDelete({ name: pluginName, displayName });
};
@ -212,7 +217,7 @@ const ClaudeCodePluginsPanel: React.FC<ClaudeCodePluginsPanelProps> = ({ accessT
visible={isAddMarketplaceModalVisible}
onClose={() => setIsAddMarketplaceModalVisible(false)}
accessToken={accessToken}
onSuccess={fetchMarketplaces}
onSuccess={handleMarketplaceAdded}
/>
{pluginToDelete && (