Skip to content

Commit e0784b5

Browse files
Hailey RyuHailey Ryu
authored andcommitted
fixes
1 parent 00e9205 commit e0784b5

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

graphql-example/src/App/App.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ class AppBase extends Component {
3636

3737
constructor (props) {
3838
super(props);
39-
this.userId = 'haileyr';
39+
this.userId = '';
4040
this.lists = {
41-
repo: true,
42-
fol: true,
43-
org: true
41+
repo: false,
42+
fol: false,
43+
org: false
4444
};
4545

4646
this.state = {
@@ -78,17 +78,16 @@ class AppBase extends Component {
7878
render () {
7979
const {index, userId, lists} = this.state;
8080

81-
return (
82-
<ApolloProvider client={client}>
83-
<ActivityPanels {...this.props} onSelectBreadcrumb={this.handleSelectBreadcrumb} index={index}>
84-
<Search
85-
onUserIdChange={this.onUserIdChange}
86-
onListSelectionChange={this.onListSelectionChange}
87-
onSearch={this.onSearch}
88-
/>
89-
<Detail userId={userId} lists={lists} />
90-
</ActivityPanels>
91-
</ApolloProvider>);
81+
return <ApolloProvider client={client}>
82+
<ActivityPanels {...this.props} onSelectBreadcrumb={this.handleSelectBreadcrumb} index={index}>
83+
<Search
84+
onUserIdChange={this.onUserIdChange}
85+
onListSelectionChange={this.onListSelectionChange}
86+
onSearch={this.onSearch}
87+
/>
88+
<Detail userId={userId} lists={lists} />
89+
</ActivityPanels>
90+
</ApolloProvider>;
9291
}
9392
}
9493

graphql-example/src/components/list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ListBase = kind({
2323
name: 'Detail',
2424

2525
propTypes: {
26-
list: PropTypes.object,
26+
list: PropTypes.arrayOf(PropTypes.object),
2727
userId: PropTypes.string
2828
},
2929

graphql-example/src/views/Detail.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ const DetailBase = kind({
4545
<Query query={GET_USER} variables={{login: userId}}>
4646
{({loading, data}) => {
4747
if (loading) {
48-
return (<Panel {...rest}><p>Loading...</p></Panel>);
48+
return <Panel {...rest}><p>Loading...</p></Panel>;
4949
} else if (!data && !data.user) {
5050
return <Panel {...rest}><p>User not found...</p></Panel>;
5151
} else {
52-
return (<Panel {...rest}>
52+
return <Panel {...rest}>
5353
<Header type="compact" title={data.user.name}>
5454
<Image src={data.user.avatarUrl} style={{height: '3rem'}} sizing="fit" />
5555
</Header>
@@ -58,7 +58,7 @@ const DetailBase = kind({
5858
{lists.org && <List list={data.user.organizations.nodes} />}
5959
{lists.fol && <List list={data.user.followers.nodes} />}
6060
</Column>
61-
</Panel>);
61+
</Panel>;
6262
}
6363
}}
6464
</Query>

graphql-example/src/views/Search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const SearchBase = kind({
3939
delete rest.onListSelectionChange;
4040
return (<Panel {...rest}>
4141
<Header title="Dev checks" type="compact" />
42-
<Input placeholder="Github id" onChange={onInputChange} />
42+
<Input placeholder="Github id" onChange={onInputChange} dismissOnEnter />
4343
<IconButton onClick={onSearch} small={false} backgroundOpacity="transparent">search</IconButton>
4444
<FormCheckboxItem onToggle={onRepoSelection}>Repositories</FormCheckboxItem>
4545
<FormCheckboxItem onToggle={onFolSelection}>Followers</FormCheckboxItem>

0 commit comments

Comments
 (0)