Skip to content

Commit 29531bf

Browse files
committed
Use publishedAt for newsItems instead of createdAt
- increased version to 0.6.7
1 parent 1622ec6 commit 29531bf

7 files changed

Lines changed: 13 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com),
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

8+
## [v0.6.7]
9+
10+
Use publishedAt for newsItems instead of createdAt
11+
812
## [v0.6.6]
913

1014
Adjust layouts and renderings prior to release

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Smart Village App - Mobile App <img src="./background-gradient.png" width="150" align="left">
22

3-
![Project version](https://img.shields.io/badge/version-0.6.6-informational.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/ee77a5fd8990be0158c1/maintainability)](https://codeclimate.com/github/ikuseiGmbH/smart-village-app-app/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/ee77a5fd8990be0158c1/test_coverage)](https://codeclimate.com/github/ikuseiGmbH/smart-village-app-app/test_coverage) ![Node version](https://img.shields.io/badge/node-11.3.0-informational.svg) ![Yarn version](https://img.shields.io/badge/yarn-1.16.0-informational.svg)
3+
![Project version](https://img.shields.io/badge/version-0.6.7-informational.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/ee77a5fd8990be0158c1/maintainability)](https://codeclimate.com/github/ikuseiGmbH/smart-village-app-app/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/ee77a5fd8990be0158c1/test_coverage)](https://codeclimate.com/github/ikuseiGmbH/smart-village-app-app/test_coverage) ![Node version](https://img.shields.io/badge/node-11.3.0-informational.svg) ![Yarn version](https://img.shields.io/badge/yarn-1.16.0-informational.svg)
44

55
The Smart Village App will be a mobile app made with React Native.
66

@@ -37,4 +37,4 @@ Have a look at the [changelog](./CHANGELOG.md) to be up to date with the develop
3737

3838
---
3939

40-
###### Version: 0.6.6
40+
###### Version: 0.6.7

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"privacy": "public",
66
"sdkVersion": "32.0.0",
77
"platforms": ["ios", "android"],
8-
"version": "0.6.6",
8+
"version": "0.6.7",
99
"orientation": "portrait",
1010
"icon": "./assets/icon.png",
1111
"splash": {

src/queries/newsItems.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const GET_NEWS_ITEMS = gql`
44
query NewsItems($limit: Int) {
55
newsItems(limit: $limit) {
66
id
7-
createdAt
7+
publishedAt
88
contentBlocks {
99
title
1010
}
@@ -19,7 +19,7 @@ export const GET_NEWS_ITEM = gql`
1919
query NewsItem($id: ID!) {
2020
newsItem(id: $id) {
2121
id
22-
createdAt
22+
publishedAt
2323
contentBlocks {
2424
title
2525
body

src/screens/DetailScreen.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,10 @@ export class DetailScreen extends React.Component {
7777
};
7878
}
7979
case 'newsItem': {
80-
const { createdAt, contentBlocks, sourceUrl, dataProvider } = data;
81-
// TODO: need to use publishedAt instead of createdAt
80+
const { publishedAt, contentBlocks, sourceUrl, dataProvider } = data;
8281

8382
return {
84-
subtitle: `${momentFormat(createdAt)} | ${dataProvider && dataProvider.name}`,
83+
subtitle: `${momentFormat(publishedAt)} | ${dataProvider && dataProvider.name}`,
8584
title: contentBlocks && contentBlocks.length && contentBlocks[0].title,
8685
body: contentBlocks && contentBlocks.length && contentBlocks[0].body,
8786
image:

src/screens/HomeScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const HomeScreen = ({ navigation }) => (
3535
data.newsItems &&
3636
data.newsItems.map((newsItem) => ({
3737
id: newsItem.id,
38-
subtitle: `${momentFormat(newsItem.createdAt)} | ${newsItem.dataProvider &&
38+
subtitle: `${momentFormat(newsItem.publishedAt)} | ${newsItem.dataProvider &&
3939
newsItem.dataProvider.name}`,
4040
title: newsItem.contentBlocks[0].title,
4141
routeName: 'Detail',

src/screens/IndexScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class IndexScreen extends React.Component {
6464
data[query] &&
6565
data[query].map((newsItem) => ({
6666
id: newsItem.id,
67-
subtitle: `${momentFormat(newsItem.createdAt)} | ${newsItem.dataProvider &&
67+
subtitle: `${momentFormat(newsItem.publishedAt)} | ${newsItem.dataProvider &&
6868
newsItem.dataProvider.name}`,
6969
title: newsItem.contentBlocks[0].title,
7070
routeName: 'Detail',

0 commit comments

Comments
 (0)