Skip to content

Commit

Permalink
show news with the tag viranomaiset only in the pap
Browse files Browse the repository at this point in the history
  • Loading branch information
aorin committed Oct 31, 2024
1 parent 2c6bc74 commit e78277c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion projects/laji/src/app/+home/home-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { GraphQLService } from '../graph-ql/service/graph-ql.service';
import { HistoryService } from '../shared/service/history.service';
import { Image } from '../shared/gallery/image-gallery/image.interface';
import { News } from '../shared/model/News';
import { environment } from '../../environments/environment';
import { Global } from '../../environments/global';

export interface IHomeData {
observations: {
Expand Down Expand Up @@ -48,6 +50,11 @@ export interface IHomeData {
};
}

const NEWS_TAGS = ['release', 'taxonomy', 'technical', 'luke.fi', 'luomus.fi', 'syke.fi', 'vieraslajit.fi'];
if (environment.type === Global.type.vir) {
NEWS_TAGS.push('viranomaiset');
}

/* eslint-disable max-len */
const HOME_QUERY = gql`
query($pageSize: Int = 5, $after: String = "", $week: String = "") {
Expand Down Expand Up @@ -84,7 +91,7 @@ const HOME_QUERY = gql`
}
}
},
news(pageSize: $pageSize) {
news(pageSize: $pageSize, tag: "${NEWS_TAGS.join(',')}") {
prevPage,
nextPage,
results {
Expand Down

0 comments on commit e78277c

Please sign in to comment.