mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-11 23:19:02 +08:00
feat: recommended apps list support sort by position (#2303)
This commit is contained in:
parent
10e9766fd3
commit
bc11c6a7f2
@ -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)
|
||||
})()
|
||||
}, [])
|
||||
|
Loading…
x
Reference in New Issue
Block a user