@@ -2,6 +2,7 @@ import {Header, Panel} from '@enact/moonstone/Panels';
22import Input from '@enact/moonstone/Input' ;
33import FormCheckboxItem from '@enact/moonstone/FormCheckboxItem' ;
44import IconButton from '@enact/moonstone/IconButton' ;
5+ import Notification from '@enact/moonstone/Notification' ;
56import kind from '@enact/core/kind' ;
67import React from 'react' ;
78import PropTypes from 'prop-types' ;
@@ -10,6 +11,7 @@ const SearchBase = kind({
1011 name : 'Detail' ,
1112
1213 propTypes : {
14+ apiToken : PropTypes . string ,
1315 onListSelectionChange : PropTypes . func ,
1416 onSearch : PropTypes . func ,
1517 onUserIdChange : PropTypes . func ,
@@ -34,10 +36,11 @@ const SearchBase = kind({
3436 }
3537 } ,
3638
37- render : ( { onInputChange, onSearch, onRepoSelection, onFolSelection, onOrgSelection, ...rest } ) => {
39+ render : ( { apiToken , onInputChange, onSearch, onRepoSelection, onFolSelection, onOrgSelection, ...rest } ) => {
3840 delete rest . onUserIdChange ;
3941 delete rest . onListSelectionChange ;
4042 return ( < Panel { ...rest } >
43+ { ! apiToken && < Notification open > < p > Please set your github token in src/config.json.</ p > </ Notification > }
4144 < Header title = "Dev checks" type = "compact" />
4245 < Input placeholder = "Github id" onChange = { onInputChange } dismissOnEnter />
4346 < IconButton onClick = { onSearch } small = { false } backgroundOpacity = "transparent" > search</ IconButton >
0 commit comments