1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-27 00:14:03 +03:00

Calculate visits correctly

This commit is contained in:
Artyom 2016-05-05 02:53:41 +03:00
parent bf10fa4036
commit 66e8a42ac5

View File

@ -215,7 +215,7 @@ renderStats globalState acts = do
thead_ $ tr_ $ do
td_ "Category"
td_ "Visits"
let catVisits = map (head &&& length) . group $
let catVisits = map (head &&& length) . group . sort $
[catId | (Action'CategoryVisit catId, _) <- acts']
for_ (reverse $ sortWith snd catVisits) $ \(catId, n) -> do
tr_ $ do