Unverified Commit bc11c6a7 authored by Joel's avatar Joel Committed by GitHub

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

parent 10e9766f
......@@ -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)
})()
}, [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment