Skip to content

Commit

Permalink
Merge pull request #43 from codeplaysoftware/homepage-event-fix
Browse files Browse the repository at this point in the history
Fixed Missing Events on Home Page
  • Loading branch information
scottstraughan authored Oct 3, 2024
2 parents d1d5697 + d95a522 commit 1d1bb38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/app/pages/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class HomeComponent implements SearchablePage, OnInit, OnDestroy {

protected readonly Layout = NewsWidgetLayout;
protected readonly CommunityUpdateModelType = ImplementationActivityType;
protected readonly environment = environment;

/**
* Constructor
Expand Down Expand Up @@ -217,6 +218,4 @@ export class HomeComponent implements SearchablePage, OnInit, OnDestroy {
getDefaultRoutePath() {
return '/';
}

protected readonly environment = environment;
}
4 changes: 2 additions & 2 deletions src/app/shared/services/models/event.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ export class EventService extends JsonFeedService {
map(events => events.filter((event) => {
return event.starts > currentDateTime ? event : null;
})),
map(events => limit ? events.slice(offset, limit) : events.slice(offset)),
map(events => events.sort((a, b) => (a.starts > b.starts) ? 1 : -1))
map(events => events.sort((a, b) => (a.starts > b.starts) ? 1 : -1)),
map(events => limit ? events.slice(offset, limit) : events.slice(offset))
);
}

Expand Down

0 comments on commit 1d1bb38

Please sign in to comment.