From 529d009d93eda1ab83c92c4a8537832856b3a5c6 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Wed, 29 Aug 2018 12:36:36 +0500 Subject: Update options message --- src/containers/feed/index.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/containers') 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 = ( + + Token is invalid, try updating the token on the options page + + ); + break; + default: + message = this.props.github.error; + break; + } + + return ( - { this.props.github.error } + { message } ); } -- cgit v1.3