Skip to content

Commit 3a09562

Browse files
author
Hailey Ryu
committed
updated as per changes requested.
1 parent cc5841a commit 3a09562

4 files changed

Lines changed: 13 additions & 17 deletions

File tree

graphql-example/src/App/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,3 @@ class AppBase extends Component {
9696
const App = MoonstoneDecorator(AppBase);
9797

9898
export default App;
99-
export {App, AppBase};

graphql-example/src/components/list.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const renderItem = ({list}) => ({index, ...rest}) => {
1919
);
2020
};
2121

22-
const ListBase = kind({
22+
const List = kind({
2323
name: 'Detail',
2424

2525
propTypes: {
@@ -46,5 +46,4 @@ const ListBase = kind({
4646
}
4747
});
4848

49-
export default ListBase;
50-
export {ListBase as List, ListBase};
49+
export default List;

graphql-example/src/views/Detail.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const GET_USER = gql`
3333
}
3434
`;
3535

36-
const DetailBase = kind({
36+
const Detail = kind({
3737
name: 'Detail',
3838

3939
propTypes: {
@@ -46,7 +46,7 @@ const DetailBase = kind({
4646
{({loading, data}) => {
4747
if (loading) {
4848
return <Panel {...rest}><p>Loading...</p></Panel>;
49-
} else if (!data && !data.user) {
49+
} else if (!data || !data.user) {
5050
return <Panel {...rest}><p>User not found...</p></Panel>;
5151
} else {
5252
return <Panel {...rest}>
@@ -64,5 +64,4 @@ const DetailBase = kind({
6464
</Query>
6565
)
6666
});
67-
export default DetailBase;
68-
export {DetailBase as Detail, DetailBase};
67+
export default Detail;

graphql-example/src/views/Search.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Notification from '@enact/moonstone/Notification';
77
import PropTypes from 'prop-types';
88
import React from 'react';
99

10-
const SearchBase = kind({
10+
const Search = kind({
1111
name: 'Detail',
1212

1313
propTypes: {
@@ -25,14 +25,14 @@ const SearchBase = kind({
2525
onInputChange: (ev, props) => {
2626
props.onUserIdChange(ev.value);
2727
},
28-
onRepoSelection: (value, props) => {
29-
props.onListSelectionChange('repo', value.selected);
28+
onRepoSelection: (ev, props) => {
29+
props.onListSelectionChange('repo', ev.selected);
3030
},
31-
onFolSelection: (value, props) => {
32-
props.onListSelectionChange('fol', value.selected);
31+
onFolSelection: (ev, props) => {
32+
props.onListSelectionChange('fol', ev.selected);
3333
},
34-
onOrgSelection: (value, props) => {
35-
props.onListSelectionChange('org', value.selected);
34+
onOrgSelection: (ev, props) => {
35+
props.onListSelectionChange('org', ev.selected);
3636
}
3737
},
3838

@@ -53,5 +53,4 @@ const SearchBase = kind({
5353
}
5454
});
5555

56-
export default SearchBase;
57-
export {SearchBase as Search, SearchBase};
56+
export default Search;

0 commit comments

Comments
 (0)