Lint app.js
This commit is contained in:
parent
50ae9c7a25
commit
14a0f19aa8
@ -1,52 +1,51 @@
|
|||||||
// Html page
|
// Html page
|
||||||
import 'file-loader?name=[name].[ext]!../index.html'
|
import "file-loader?name=[name].[ext]!../index.html"
|
||||||
|
|
||||||
// Import default image
|
// Import default image
|
||||||
import 'file-loader?name=img/[name].png!../img/noimage.png'
|
import "file-loader?name=img/[name].png!../img/noimage.png"
|
||||||
|
|
||||||
// Import favicon settings
|
// Import favicon settings
|
||||||
import 'file-loader?name=[name].png!../img/android-chrome-192x192.png'
|
import "file-loader?name=[name].png!../img/android-chrome-192x192.png"
|
||||||
import 'file-loader?name=[name].png!../img/android-chrome-512x512.png'
|
import "file-loader?name=[name].png!../img/android-chrome-512x512.png"
|
||||||
import 'file-loader?name=[name].png!../img/apple-touch-icon.png'
|
import "file-loader?name=[name].png!../img/apple-touch-icon.png"
|
||||||
import 'file-loader?name=[name].png!../img/favicon-16x16.png'
|
import "file-loader?name=[name].png!../img/favicon-16x16.png"
|
||||||
import 'file-loader?name=[name].png!../img/favicon-32x32.png'
|
import "file-loader?name=[name].png!../img/favicon-32x32.png"
|
||||||
import 'file-loader?name=[name].png!../img/favicon.ico'
|
import "file-loader?name=[name].png!../img/favicon.ico"
|
||||||
import 'file-loader?name=[name].png!../img/safari-pinned-tab.svg'
|
import "file-loader?name=[name].png!../img/safari-pinned-tab.svg"
|
||||||
|
|
||||||
// Import manifest
|
// Import manifest
|
||||||
import 'file-loader?name=[name].json!../manifest.json'
|
import "file-loader?name=[name].json!../manifest.json"
|
||||||
|
|
||||||
// Styles
|
// Styles
|
||||||
import '../less/app.less'
|
import "../less/app.less"
|
||||||
|
|
||||||
// React
|
// React
|
||||||
import React from 'react'
|
import React from "react"
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from "react-dom"
|
||||||
import { bindActionCreators } from 'redux'
|
import { bindActionCreators } from "redux"
|
||||||
import { Provider, connect } from 'react-redux'
|
import { Provider, connect } from "react-redux"
|
||||||
import { Router } from 'react-router'
|
import { Router } from "react-router"
|
||||||
import { routerActions } from 'react-router-redux'
|
|
||||||
|
|
||||||
// Action creators
|
// Action creators
|
||||||
import { dismissAlert } from './actions/alerts'
|
import { dismissAlert } from "./actions/alerts"
|
||||||
|
|
||||||
// Store
|
// Store
|
||||||
import store, { history } from './store'
|
import store, { history } from "./store"
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import NavBar from './components/navbar'
|
import NavBar from "./components/navbar"
|
||||||
import Alert from './components/alerts/alert'
|
import Alert from "./components/alerts/alert"
|
||||||
|
|
||||||
// Routes
|
// Routes
|
||||||
import getRoutes from './routes'
|
import getRoutes from "./routes"
|
||||||
|
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
let torrentCount = 0;
|
let torrentCount = 0;
|
||||||
if (state.torrentStore.has('torrents') && state.torrentStore.get('torrents') !== undefined) {
|
if (state.torrentStore.has("torrents") && state.torrentStore.get("torrents") !== undefined) {
|
||||||
torrentCount = state.torrentStore.get('torrents').size;
|
torrentCount = state.torrentStore.get("torrents").size;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
username: state.userStore.get('username'),
|
username: state.userStore.get("username"),
|
||||||
torrentCount: torrentCount,
|
torrentCount: torrentCount,
|
||||||
alerts: state.alerts,
|
alerts: state.alerts,
|
||||||
}
|
}
|
||||||
@ -80,4 +79,4 @@ ReactDOM.render((
|
|||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<Router history={history} routes={getRoutes(App)} />
|
<Router history={history} routes={getRoutes(App)} />
|
||||||
</Provider>
|
</Provider>
|
||||||
),document.getElementById('app'));
|
),document.getElementById("app"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user