Skip to content

Commit

Permalink
Fix date-time format in logs. Refresh automatically logs each 10 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbrea committed Feb 25, 2019
1 parent 302bcd6 commit dbbb36c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/scroll-paginated-list/ScrollPaginatedList.js
Expand Up @@ -8,7 +8,7 @@ export class ScrollPaginatedList extends Component {
constructor(props) {
super(props);
this.state = {
currentPage: 0
currentPage: 1
};
this.loadMore = this.loadMore.bind(this);
}
Expand All @@ -27,7 +27,7 @@ export class ScrollPaginatedList extends Component {
const List = this.props.List;
const ListWrapper = this.props.ListWrapper;
const pages = [];
for (let i = 1; i < this.state.currentPage; i++) {
for (let i = 1; i < this.state.currentPage + 1; i++) {
pages.push(
<List
page={i}
Expand Down
2 changes: 1 addition & 1 deletion src/data-layer/helpers.js
Expand Up @@ -3,7 +3,7 @@ import moment from "moment";
export const EMAIL_REGEX = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$/;

export const formatDate = dateString => {
return moment(dateString).format("YY-MM-DD, hh:mm:ss");
return moment(dateString).format("YY-MM-DD, HH:mm:ss");
};

export const displayValue = value => {
Expand Down
6 changes: 4 additions & 2 deletions src/data-layer/services/logs/origins.js
Expand Up @@ -7,7 +7,8 @@ export const logs = new origins.Api(
{},
{
...authConfig,
defaultValue: []
defaultValue: [],
expirationTime: 10000
}
);

Expand All @@ -18,7 +19,8 @@ export const countLogs = new origins.Api(
...authConfig,
defaultValue: {
total: 0
}
},
expirationTime: 10000
}
);

Expand Down

0 comments on commit dbbb36c

Please sign in to comment.