diff options
Diffstat (limited to 'frontend/src/components/store/Store.tsx')
| -rw-r--r-- | frontend/src/components/store/Store.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/frontend/src/components/store/Store.tsx b/frontend/src/components/store/Store.tsx index 1094b243..3209ba08 100644 --- a/frontend/src/components/store/Store.tsx +++ b/frontend/src/components/store/Store.tsx @@ -14,6 +14,7 @@ import { useTranslation } from 'react-i18next'; import logo from '../../../assets/plugin_store.png'; import Logger from '../../logger'; import { SortDirections, SortOptions, Store, StorePlugin, getPluginList, getStore } from '../../store'; +import { useDeckyState } from '../DeckyState'; import ExternalLink from '../ExternalLink'; import PluginCard from './PluginCard'; @@ -104,6 +105,8 @@ const BrowseTab: FC<{ setPluginCount: Dispatch<SetStateAction<number | null>> }> })(); }, []); + const { plugins: installedPlugins } = useDeckyState(); + return ( <> <style>{` @@ -235,7 +238,12 @@ const BrowseTab: FC<{ setPluginCount: Dispatch<SetStateAction<number | null>> }> plugin.tags.some((tag: string) => tag.toLowerCase().includes(searchFieldValue.toLowerCase())) ); }) - .map((plugin: StorePlugin) => <PluginCard plugin={plugin} />) + .map((plugin: StorePlugin) => ( + <PluginCard + storePlugin={plugin} + installedPlugin={installedPlugins.find((installedPlugin) => installedPlugin.name === plugin.name)} + /> + )) )} </div> </> |
