diff --git a/web/app/components/explore/sidebar/index.tsx b/web/app/components/explore/sidebar/index.tsx index a4a40a00a2..13d5a0ec8f 100644 --- a/web/app/components/explore/sidebar/index.tsx +++ b/web/app/components/explore/sidebar/index.tsx @@ -11,6 +11,7 @@ import cn from '@/utils/classnames' import { fetchInstalledAppList as doFetchInstalledAppList, uninstallApp, updatePinStatus } from '@/service/explore' import ExploreContext from '@/context/explore-context' import Confirm from '@/app/components/base/confirm' +import Divider from '@/app/components/base/divider' import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' const SelectedDiscoveryIcon = () => ( @@ -89,6 +90,7 @@ const SideBar: FC = ({ fetchInstalledAppList() }, [controlUpdateInstalledApps]) + const pinnedAppsCount = installedApps.filter(({ is_pinned }) => is_pinned).length return (
@@ -109,10 +111,9 @@ const SideBar: FC = ({ height: 'calc(100vh - 250px)', }} > - {installedApps.map(({ id, is_pinned, uninstallable, app: { name, icon_type, icon, icon_url, icon_background } }) => { - return ( + {installedApps.map(({ id, is_pinned, uninstallable, app: { name, icon_type, icon, icon_url, icon_background } }, index) => ( + = ({ setShowConfirm(true) }} /> - ) - })} + {index === pinnedAppsCount - 1 && index !== installedApps.length - 1 && } + + ))}
)}