summaryrefslogtreecommitdiff
path: root/src/components/top-nav/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/top-nav/index.js')
-rw-r--r--src/components/top-nav/index.js61
1 files changed, 9 insertions, 52 deletions
diff --git a/src/components/top-nav/index.js b/src/components/top-nav/index.js
index 0212dab..7163845 100644
--- a/src/components/top-nav/index.js
+++ b/src/components/top-nav/index.js
@@ -1,19 +1,9 @@
import React from 'react';
-import PropTypes from 'prop-types';
-import classNames from 'classnames';
import './styles.css';
import Logo from '../icons/logo';
class TopNav extends React.Component {
- updateDateJump = (dateJump) => {
- if (dateJump === this.props.selectedDateJump) {
- return;
- }
-
- this.props.updateDateJump(dateJump);
- };
-
render() {
return (
<div className='top-nav'>
@@ -28,43 +18,15 @@ class TopNav extends React.Component {
<p className="text-muted">Most starred projects on GitHub</p>
</div>
</a>
- <div className="float-right duration-btns">
- <button onClick={ () => this.updateDateJump('year') }
- className={
- classNames('btn', {
- 'btn-primary': this.props.selectedDateJump === 'year',
- 'btn-light': this.props.selectedDateJump !== 'year',
- })
- }>
- Yearly
- </button>
- <button onClick={ () => this.updateDateJump('month') }
- className={
- classNames('btn', {
- 'btn-primary': this.props.selectedDateJump === 'month',
- 'btn-light': this.props.selectedDateJump !== 'month',
- })
- }>
- Monthly
- </button>
- <button onClick={ () => this.updateDateJump('week') }
- className={
- classNames('btn', {
- 'btn-primary': this.props.selectedDateJump === 'week',
- 'btn-light': this.props.selectedDateJump !== 'week',
- })
- }>
- Weekly
- </button>
- <button onClick={ () => this.updateDateJump('day') }
- className={
- classNames('btn', {
- 'btn-primary': this.props.selectedDateJump === 'day',
- 'btn-light': this.props.selectedDateJump !== 'day',
- })
- }>
- Daily
- </button>
+ <div className="float-right external-btns">
+ <a href='http://github.com/kamranahmedse/githunt'
+ target='_blank'
+ rel="noopener noreferrer"
+ className="btn btn-dark"><i className="fa fa-github mr-1"></i> View Source</a>
+ <a href='http://github.com/kamranahmedse/githunt'
+ target='_blank'
+ rel="noopener noreferrer"
+ className="btn btn-danger"><i className="fa fa-chrome mr-1"></i> Use Extension</a>
</div>
</div>
</div>
@@ -72,9 +34,4 @@ class TopNav extends React.Component {
}
}
-TopNav.propTypes = {
- updateDateJump: PropTypes.func.isRequired,
- selectedDateJump: PropTypes.string
-};
-
export default TopNav;