File tree 2 files changed +16
-14
lines changed
2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 1
- import React , { PropTypes } from 'react' ;
1
+ import React , { Component , PropTypes } from 'react' ;
2
2
import { Link } from 'react-router' ;
3
3
4
- export default class Repo {
5
- static propTypes = {
6
- repo : PropTypes . shape ( {
7
- name : PropTypes . string . isRequired ,
8
- description : PropTypes . string
9
- } ) . isRequired ,
10
- owner : PropTypes . shape ( {
11
- login : PropTypes . string . isRequired
12
- } ) . isRequired
13
- }
4
+ export default class Repo extends Component {
14
5
15
6
render ( ) {
16
7
const { repo, owner } = this . props ;
@@ -35,3 +26,13 @@ export default class Repo {
35
26
) ;
36
27
}
37
28
}
29
+
30
+ Repo . propTypes = {
31
+ repo : PropTypes . shape ( {
32
+ name : PropTypes . string . isRequired ,
33
+ description : PropTypes . string
34
+ } ) . isRequired ,
35
+ owner : PropTypes . shape ( {
36
+ login : PropTypes . string . isRequired
37
+ } ) . isRequired
38
+ } ;
Original file line number Diff line number Diff line change @@ -41,10 +41,11 @@ function callApi(endpoint, schema) {
41
41
const camelizedJson = camelizeKeys ( json ) ;
42
42
const nextPageUrl = getNextPageUrl ( response ) || undefined ;
43
43
44
- return {
45
- ...normalize ( camelizedJson , schema ) ,
44
+ return Object . assign ( {
45
+ { } ,
46
+ normalize ( camelizedJson , schema ) ,
46
47
nextPageUrl
47
- } ;
48
+ } ) ;
48
49
} ) ;
49
50
}
50
51
You can’t perform that action at this time.
0 commit comments