Added infinite scrolling to companies
This commit is contained in:
@ -16,7 +16,7 @@ func Best(ctx *aero.Context) string {
|
||||
// Fetch all eligible quotes
|
||||
allQuotes := fetchAll()
|
||||
|
||||
// Sort the quotes by date
|
||||
// Sort the quotes by number of likes
|
||||
arn.SortQuotesPopularFirst(allQuotes)
|
||||
|
||||
// Slice the part that we need
|
||||
|
@ -1,4 +1,4 @@
|
||||
component Quotes(quotes []*arn.Quote, loadMoreIndex int, user *arn.User)
|
||||
component Quotes(quotes []*arn.Quote, nextIndex int, user *arn.User)
|
||||
h1.page-title Quotes
|
||||
|
||||
QuotesTabs
|
||||
@ -17,9 +17,9 @@ component Quotes(quotes []*arn.Quote, loadMoreIndex int, user *arn.User)
|
||||
#load-more-target.quotes
|
||||
QuotesScrollable(quotes, user)
|
||||
|
||||
if loadMoreIndex != -1
|
||||
if nextIndex != -1
|
||||
.buttons
|
||||
LoadMore(loadMoreIndex)
|
||||
LoadMore(nextIndex)
|
||||
|
||||
component QuotesScrollable(quotes []*arn.Quote, user *arn.User)
|
||||
each quote in quotes
|
||||
|
Reference in New Issue
Block a user