Skip to content

Commit 7ea4ae5

Browse files
committed
Fix linting errors and warnings
1 parent b1bfb91 commit 7ea4ae5

File tree

6 files changed

+16
-20
lines changed

6 files changed

+16
-20
lines changed

client/components/createRedirectWithUsername.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import PropTypes from 'prop-types';
32
import { connect } from 'react-redux';
43
import { browserHistory } from 'react-router';
54

@@ -8,7 +7,7 @@ const RedirectToUser = ({ username, url = '/:username/sketches' }) => {
87
if (username == null) {
98
return;
109
}
11-
10+
1211
browserHistory.replace(url.replace(':username', username));
1312
}, [username]);
1413

@@ -23,6 +22,6 @@ function mapStateToProps(state) {
2322

2423
const ConnectedRedirectToUser = connect(mapStateToProps)(RedirectToUser);
2524

26-
const createRedirectWithUsername = (url) => (props) => <ConnectedRedirectToUser {...props} url={url} />;
25+
const createRedirectWithUsername = url => props => <ConnectedRedirectToUser {...props} url={url} />;
2726

2827
export default createRedirectWithUsername;

client/modules/App/App.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ class App extends React.Component {
3939
App.propTypes = {
4040
children: PropTypes.element,
4141
location: PropTypes.shape({
42-
pathname: PropTypes.string
42+
pathname: PropTypes.string,
43+
state: PropTypes.shape({
44+
skipSavingPath: PropTypes.bool,
45+
}),
4346
}).isRequired,
4447
setPreviousPath: PropTypes.func.isRequired,
4548
};

client/modules/User/actions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { browserHistory } from 'react-router';
22
import axios from 'axios';
3-
import crypto from 'crypto';
43
import * as ActionTypes from '../../constants';
54
import { showErrorModal, justOpenedProject } from '../IDE/actions/ide';
65
import { showToast, setToastText } from '../IDE/actions/toast';

client/modules/User/components/DashboardTabSwitcher.jsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,14 @@ Tab.propTypes = {
2727
to: PropTypes.string.isRequired,
2828
};
2929

30-
const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => {
31-
return (
32-
<ul className="dashboard-header__switcher">
33-
<div className="dashboard-header__tabs">
34-
<Tab to={`/${username}/sketches`} isSelected={currentTab === 'sketches'}>Sketches</Tab>
35-
{isOwner && <Tab to={`/${username}/assets`} isSelected={currentTab === 'assets'}>Assets</Tab>}
36-
</div>
37-
</ul>
38-
);
39-
};
30+
const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => (
31+
<ul className="dashboard-header__switcher">
32+
<div className="dashboard-header__tabs">
33+
<Tab to={`/${username}/sketches`} isSelected={currentTab === 'sketches'}>Sketches</Tab>
34+
{isOwner && <Tab to={`/${username}/assets`} isSelected={currentTab === 'assets'}>Assets</Tab>}
35+
</div>
36+
</ul>
37+
);
4038

4139
DashboardTabSwitcher.propTypes = {
4240
currentTab: PropTypes.string.isRequired,

client/modules/User/pages/AccountView.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { reduxForm } from 'redux-form';
44
import { bindActionCreators } from 'redux';
55
import { browserHistory } from 'react-router';
66
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
7-
import InlineSVG from 'react-inlinesvg';
87
import axios from 'axios';
98
import { Helmet } from 'react-helmet';
109
import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions';
@@ -14,8 +13,6 @@ import GithubButton from '../components/GithubButton';
1413
import APIKeyForm from '../components/APIKeyForm';
1514
import NavBasic from '../../../components/NavBasic';
1615

17-
const exitUrl = require('../../../images/exit.svg');
18-
1916
class AccountView extends React.Component {
2017
constructor(props) {
2118
super(props);

client/modules/User/pages/DashboardView.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
22
import React from 'react';
33
import { connect } from 'react-redux';
44
import { bindActionCreators } from 'redux';
5-
import { browserHistory, Link } from 'react-router';
5+
import { browserHistory } from 'react-router';
66
import { Helmet } from 'react-helmet';
77
import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions';
88
import NavBasic from '../../../components/NavBasic';
@@ -80,7 +80,7 @@ class DashboardView extends React.Component {
8080

8181
<DashboardTabSwitcher currentTab={currentTab} isOwner={isOwner} username={username} />
8282
</div>
83-
83+
8484
<div className="dashboard-content">
8585
{
8686
currentTab === TabKey.sketches ? <SketchList username={username} /> : <AssetList username={username} />

0 commit comments

Comments
 (0)