Sort tag list by count

It was displayed in some random order. Now the most used tag is first.
This commit is contained in:
Eike Kettner 2020-07-31 00:14:25 +02:00
parent dbd0f3ff97
commit 091ded50cb

View File

@ -136,7 +136,11 @@ viewInsights model =
[ text "Tags" [ text "Tags"
] ]
, div [ class "ui statistics" ] , div [ class "ui statistics" ]
(List.map makeTagStats model.insights.tagCloud.items) (List.map makeTagStats
(List.sortBy .count model.insights.tagCloud.items
|> List.reverse
)
)
] ]
] ]