Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: recommended apps list support sort by position (#2303)

Joelbc11c6a7f218
diff --git a/web/app/components/explore/app-list/index.tsx b/web/app/components/explore/app-list/index.tsx
index 307145992e4..02a49782ecf 100644
--- a/web/app/components/explore/app-list/index.tsx
+++ b/web/app/components/explore/app-list/index.tsx
@@ -38,8 +38,10 @@ const Apps: FC = () => {
useEffect(() => {
(async () => {
const { categories, recommended_apps }: any = await fetchAppList()
+ const sortedRecommendedApps = [...recommended_apps]
+ sortedRecommendedApps.sort((a, b) => a.position - b.position) // position from small to big
setCategories(categories)
- setAllList(recommended_apps)
+ setAllList(sortedRecommendedApps)
setIsLoaded(true)
})()
}, [])