summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKamran Ahmed <kamranahmed.se@gmail.com>2018-08-28 11:41:43 +0500
committerKamran Ahmed <kamranahmed.se@gmail.com>2018-08-28 11:41:43 +0500
commit630813513be052188fc2c1c76f0617a42e582313 (patch)
treebb349390aa9f5f6236de97b369dad2c2b8f7aa3e /src
parentFix linter issues and UI (diff)
downloadgithunt-630813513be052188fc2c1c76f0617a42e582313.tar.gz
Alert for token
Diffstat (limited to 'src')
-rw-r--r--src/containers/feed/index.js15
-rw-r--r--src/containers/feed/styles.css8
2 files changed, 22 insertions, 1 deletions
diff --git a/src/containers/feed/index.js b/src/containers/feed/index.js
index d39da28..6cff00f 100644
--- a/src/containers/feed/index.js
+++ b/src/containers/feed/index.js
@@ -1,6 +1,7 @@
import React from 'react';
import moment from 'moment';
import { connect } from 'react-redux';
+import { Link } from 'react-router-dom';
import './styles.css';
import Loader from '../../components/loader';
@@ -80,7 +81,19 @@ class FeedContainer extends React.Component {
selectedDateJump={ this.props.preference.dateJump }
/>
- <div className="container mt-4 mb-5 pb-4">
+ {
+ !this.props.preference.options.token && (
+ <p className="alert alert-warning">
+ Although not required but make sure to
+ <strong className='ml-1 mr-1'>
+ <Link to='/options'>add a token</Link>
+ </strong>
+ to avoid hitting the rate limit
+ </p>
+ )
+ }
+
+ <div className="container mb-5 pb-4">
<div className="header-row clearfix">
{
this.props.github.repositories &&
diff --git a/src/containers/feed/styles.css b/src/containers/feed/styles.css
index 8ab4795..95d47bc 100644
--- a/src/containers/feed/styles.css
+++ b/src/containers/feed/styles.css
@@ -35,3 +35,11 @@
display: block;
margin: 25px auto auto;
}
+
+.alert-warning {
+ margin-top: -35px;
+ background: #ffa;
+ border-top: none;
+ margin-bottom: 25px;
+ text-align: center;
+}