diff --git a/js/src/types/sorting.model.ts b/js/src/types/sorting.model.ts deleted file mode 100644 index 57271875c..000000000 --- a/js/src/types/sorting.model.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { EventSortField, SortDirection } from "./enums"; - -export interface ISorting { - title: string; - orderBy: EventSortField; - direction: SortDirection; -} - -export class SortingUpcoming implements ISorting { - title = "Upcoming Events"; - orderBy = EventSortField.BEGINS_ON; - direction = SortDirection.ASC; -} - -export class SortingCreated implements ISorting { - title = "Recently created Events"; - orderBy = EventSortField.INSERTED_AT; - direction = SortDirection.DESC; -} diff --git a/js/src/views/Home.vue b/js/src/views/Home.vue index 5dc66419d..ace64eff7 100644 --- a/js/src/views/Home.vue +++ b/js/src/views/Home.vue @@ -43,7 +43,15 @@ >

- {{ $t(this.sorting.title) }} + {{ + $t( + config && + config.instanceHomepageSorting === + InstanceHomepageSorting.UPCOMING + ? "Upcoming Events" + : "Last published events" + ) + }}

@@ -226,7 +234,15 @@ />

- {{ $t(this.sorting.title) }} + {{ + $t( + config && + config.instanceHomepageSorting === + InstanceHomepageSorting.UPCOMING + ? "Upcoming Events" + : "Last published events" + ) + }}

@@ -258,7 +274,12 @@