summaryrefslogtreecommitdiff
path: root/src/containers
diff options
context:
space:
mode:
authorKamran Ahmed <kamranahmed.se@gmail.com>2018-08-29 12:36:36 +0500
committerKamran Ahmed <kamranahmed.se@gmail.com>2018-08-29 12:36:36 +0500
commit529d009d93eda1ab83c92c4a8537832856b3a5c6 (patch)
tree96745bfac664b4fc43f8bcd4dab0875858e2248d /src/containers
parentSave options functionality (diff)
downloadgithunt-529d009d93eda1ab83c92c4a8537832856b3a5c6.tar.gz
Update options message
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/feed/index.js22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/containers/feed/index.js b/src/containers/feed/index.js
index b33e192..20a8913 100644
--- a/src/containers/feed/index.js
+++ b/src/containers/feed/index.js
@@ -87,9 +87,27 @@ class FeedContainer extends React.Component {
}
renderErrors() {
- return this.props.github.error && (
+ if (!this.props.github.error) {
+ return null;
+ }
+
+ let message = '';
+ switch (this.props.github.error.toLowerCase()) {
+ case 'bad credentials':
+ message = (
+ <span>
+ Token is invalid, try <Link to='/options'>updating the token</Link> on the options page
+ </span>
+ );
+ break;
+ default:
+ message = this.props.github.error;
+ break;
+ }
+
+ return (
<Alert type='danger'>
- { this.props.github.error }
+ { message }
</Alert>
);
}