| 57 | } |
| 58 | |
| 59 | getNextDateRange() { |
| 60 | const repositories = this.props.github.repositories || []; |
| 61 | const dateJump = this.props.preference.dateJump; |
| 62 | |
| 63 | const dateRange = {}; |
| 64 | const lastRecords = repositories[repositories.length - 1]; |
| 65 | |
| 66 | if (lastRecords) { |
| 67 | dateRange.start = moment(lastRecords.start).subtract(1, dateJump); |
| 68 | dateRange.end = lastRecords.start; |
| 69 | } else { |
| 70 | dateRange.start = moment().subtract(1, dateJump); |
| 71 | dateRange.end = moment(); |
| 72 | } |
| 73 | |
| 74 | return dateRange; |
| 75 | } |
| 76 | |
| 77 | renderTokenWarning() { |
| 78 | return !this.props.preference.options.token && ( |