Company UI improvements
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package companies
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
@ -17,6 +19,10 @@ func Get(ctx *aero.Context) string {
|
||||
return !company.IsDraft
|
||||
})
|
||||
|
||||
sort.Slice(companies, func(i, j int) bool {
|
||||
return companies[i].Created > companies[j].Created
|
||||
})
|
||||
|
||||
if len(companies) > maxEntries {
|
||||
companies = companies[:maxEntries]
|
||||
}
|
||||
|
Reference in New Issue
Block a user