diff --git a/desktop/app/src/PluginContainer.tsx b/desktop/app/src/PluginContainer.tsx index fdd6927b4..08b732290 100644 --- a/desktop/app/src/PluginContainer.tsx +++ b/desktop/app/src/PluginContainer.tsx @@ -54,7 +54,7 @@ import semver from 'semver'; import {loadPlugin} from './reducers/pluginManager'; import {produce} from 'immer'; import {reportUsage} from './utils/metrics'; -import PluginInfo from './chrome/fb-stubs/PluginInfo'; +import {PluginInfo} from './chrome/fb-stubs/PluginInfo'; import {getActiveClient, getActivePlugin} from './selectors/connections'; const {Text, Link} = Typography; diff --git a/desktop/app/src/chrome/fb-stubs/PluginInfo.tsx b/desktop/app/src/chrome/fb-stubs/PluginInfo.tsx index 4687a1765..b5611d3d4 100644 --- a/desktop/app/src/chrome/fb-stubs/PluginInfo.tsx +++ b/desktop/app/src/chrome/fb-stubs/PluginInfo.tsx @@ -26,7 +26,7 @@ const Waiting = styled(Layout.Container)({ textAlign: 'center', }); -export default function PluginInfo() { +export function PluginInfo() { const pluginId = useStore((state) => state.connections.selectedPlugin); const enabledPlugins = useStore((state) => state.connections.enabledPlugins); const enabledDevicePlugins = useStore( diff --git a/desktop/app/src/selectors/connections.tsx b/desktop/app/src/selectors/connections.tsx index 8a95b7cd2..755b72586 100644 --- a/desktop/app/src/selectors/connections.tsx +++ b/desktop/app/src/selectors/connections.tsx @@ -24,6 +24,7 @@ const getUserPreferredDevice = (state: State) => state.connections.userPreferredDevice; const getClients = (state: State) => state.connections.clients; const getDevices = (state: State) => state.connections.devices; +const getPluginDownloads = (state: State) => state.pluginDownloads; export const getActiveClient = createSelector( getSelectedApp, @@ -133,3 +134,13 @@ export const getActivePlugin = createSelector( return pluginList[pluginId] ?? null; }, ); + +export const getPluginDownloadStatusMap = createSelector( + getPluginDownloads, + (downloads) => { + const downloadMap = new Map( + Object.values(downloads).map((x) => [x.plugin.id, x]), + ); + return downloadMap; + }, +);