Fix linting errors and warnings
This commit is contained in:
parent
b1bfb91f80
commit
7ea4ae5637
6 changed files with 16 additions and 20 deletions
|
@ -1,5 +1,4 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import { browserHistory } from 'react-router';
|
||||
|
||||
|
@ -23,6 +22,6 @@ function mapStateToProps(state) {
|
|||
|
||||
const ConnectedRedirectToUser = connect(mapStateToProps)(RedirectToUser);
|
||||
|
||||
const createRedirectWithUsername = (url) => (props) => <ConnectedRedirectToUser {...props} url={url} />;
|
||||
const createRedirectWithUsername = url => props => <ConnectedRedirectToUser {...props} url={url} />;
|
||||
|
||||
export default createRedirectWithUsername;
|
||||
|
|
|
@ -39,7 +39,10 @@ class App extends React.Component {
|
|||
App.propTypes = {
|
||||
children: PropTypes.element,
|
||||
location: PropTypes.shape({
|
||||
pathname: PropTypes.string
|
||||
pathname: PropTypes.string,
|
||||
state: PropTypes.shape({
|
||||
skipSavingPath: PropTypes.bool,
|
||||
}),
|
||||
}).isRequired,
|
||||
setPreviousPath: PropTypes.func.isRequired,
|
||||
};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { browserHistory } from 'react-router';
|
||||
import axios from 'axios';
|
||||
import crypto from 'crypto';
|
||||
import * as ActionTypes from '../../constants';
|
||||
import { showErrorModal, justOpenedProject } from '../IDE/actions/ide';
|
||||
import { showToast, setToastText } from '../IDE/actions/toast';
|
||||
|
|
|
@ -27,16 +27,14 @@ Tab.propTypes = {
|
|||
to: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => {
|
||||
return (
|
||||
<ul className="dashboard-header__switcher">
|
||||
<div className="dashboard-header__tabs">
|
||||
<Tab to={`/${username}/sketches`} isSelected={currentTab === 'sketches'}>Sketches</Tab>
|
||||
{isOwner && <Tab to={`/${username}/assets`} isSelected={currentTab === 'assets'}>Assets</Tab>}
|
||||
</div>
|
||||
</ul>
|
||||
);
|
||||
};
|
||||
const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => (
|
||||
<ul className="dashboard-header__switcher">
|
||||
<div className="dashboard-header__tabs">
|
||||
<Tab to={`/${username}/sketches`} isSelected={currentTab === 'sketches'}>Sketches</Tab>
|
||||
{isOwner && <Tab to={`/${username}/assets`} isSelected={currentTab === 'assets'}>Assets</Tab>}
|
||||
</div>
|
||||
</ul>
|
||||
);
|
||||
|
||||
DashboardTabSwitcher.propTypes = {
|
||||
currentTab: PropTypes.string.isRequired,
|
||||
|
|
|
@ -4,7 +4,6 @@ import { reduxForm } from 'redux-form';
|
|||
import { bindActionCreators } from 'redux';
|
||||
import { browserHistory } from 'react-router';
|
||||
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
|
||||
import InlineSVG from 'react-inlinesvg';
|
||||
import axios from 'axios';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions';
|
||||
|
@ -14,8 +13,6 @@ import GithubButton from '../components/GithubButton';
|
|||
import APIKeyForm from '../components/APIKeyForm';
|
||||
import NavBasic from '../../../components/NavBasic';
|
||||
|
||||
const exitUrl = require('../../../images/exit.svg');
|
||||
|
||||
class AccountView extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
|
@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { browserHistory, Link } from 'react-router';
|
||||
import { browserHistory } from 'react-router';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions';
|
||||
import NavBasic from '../../../components/NavBasic';
|
||||
|
|
Loading…
Reference in a new issue