diff --git a/web/src/app/home/add-extension/page.tsx b/web/src/app/home/add-extension/page.tsx index cf20bc6f..42e8d148 100644 --- a/web/src/app/home/add-extension/page.tsx +++ b/web/src/app/home/add-extension/page.tsx @@ -162,19 +162,6 @@ function AddExtensionContent() { : type === 'skill' ? t('market.typeSkill') : t('market.typePlugin'); - - // Marketplace icon URL for the extension being installed, by type. - const buildInstallIconURL = () => { - const cloud = getCloudServiceClientSync(); - const a = installInfo.plugin_author || ''; - const n = installInfo.plugin_name || ''; - if (installExtensionType === 'mcp') - return cloud.getMCPMarketplaceIconURL(a, n); - if (installExtensionType === 'skill') - return cloud.getSkillMarketplaceIconURL(a, n); - return cloud.getPluginIconURL(a, n); - }; - const installIconURL = buildInstallIconURL(); const { addTask, setSelectedTaskId, @@ -191,6 +178,19 @@ function AddExtensionContent() { useState(PluginInstallStatus.ASK_CONFIRM); const [installError, setInstallError] = useState(null); const [installIconFailed, setInstallIconFailed] = useState(false); + + // Marketplace icon URL for the extension being installed, by type. + const installIconURL = (() => { + const cloud = getCloudServiceClientSync(); + const a = installInfo.plugin_author || ''; + const n = installInfo.plugin_name || ''; + if (installExtensionType === 'mcp') + return cloud.getMCPMarketplaceIconURL(a, n); + if (installExtensionType === 'skill') + return cloud.getSkillMarketplaceIconURL(a, n); + return cloud.getPluginIconURL(a, n); + })(); + const [popoverOpen, setPopoverOpen] = useState(false); const [popoverView, setPopoverView] = useState('menu'); const [isDragOver, setIsDragOver] = useState(false);