Clean imports in all the javascript files

This commit is contained in:
JP1998 2019-04-09 09:51:15 +02:00
parent c4ce39f353
commit f1e206db0b
19 changed files with 158 additions and 131 deletions

View File

@ -1,7 +1,12 @@
import { createStore, applyMiddleware, combineReducers } from 'redux';
import {
createStore,
applyMiddleware,
combineReducers
} from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import thunkMiddleware from 'redux-thunk';
import { errorMessages } from './constants';
import thunkMiddleware from 'redux-thunk';
import { errorMessages } from './constants';
const axios = require('axios');

View File

@ -1,5 +1,11 @@
import React from 'react';
import { Alert, Button, Input, InputGroup, InputGroupAddon } from 'reactstrap';
import {
Alert,
Button,
Input,
InputGroup,
InputGroupAddon
} from 'reactstrap';
export default class EditableStringList extends React.Component {
constructor(props) {

View File

@ -1,9 +1,12 @@
import Head from 'next/head';
import React from 'react';
import Head from 'next/head';
import React from 'react';
import { Container } from 'reactstrap';
import { TurniereNavigation } from './Navigation';
import { Footer } from './Footer'
import { Footer } from './Footer';
import 'bootstrap/dist/css/bootstrap.min.css';
import {Container} from 'reactstrap';
import '../../static/everypage.css';
import '../../static/css/error.css';

View File

@ -8,9 +8,10 @@ import {
Input,
Button
} from 'reactstrap';
import React from 'react';
import React from 'react';
import { connect } from 'react-redux';
import { login } from '../api';
import { login } from '../api';
export function Login(props) {
return (

View File

@ -11,8 +11,9 @@ import {
NavLink
} from 'reactstrap';
import { connect } from 'react-redux';
import React from 'react';
import { login, logout } from '../api';
import React from 'react';
import { logout } from '../api';
export class TurniereNavigation extends React.Component {

View File

@ -1,4 +1,4 @@
import React from 'react';
import React from 'react';
import { initializeStore } from '../api';
const isServer = typeof window === 'undefined';

View File

@ -1,8 +1,9 @@
import App, {Container} from 'next/app';
import React from 'react';
import { Provider } from 'react-redux';
import withReduxStore from '../js/redux/reduxStoreBinder';
import Notifications from 'react-notify-toast';
import { App, Container } from 'next/app';
import React from 'react';
import { Provider } from 'react-redux';
import Notifications from 'react-notify-toast';
import withReduxStore from '../js/redux/reduxStoreBinder';
class TurniereApp extends App {

View File

@ -1,9 +1,7 @@
import { ErrorPageComponent } from '../js/components/ErrorComponents.js';
import React from 'react';
import React from 'react';
import {
verifyCredentials
} from '../js/api';
import { ErrorPageComponent } from '../js/components/ErrorComponents';
import { verifyCredentials } from '../js/api';
export default class Error extends React.Component {
static getInitialProps({ res, err }) {

View File

@ -1,11 +1,6 @@
import Head from 'next/head';
import '../static/everypage.css';
import { TurniereNavigation } from '../js/components/Navigation';
import { Footer } from '../js/components/Footer.js';
import { UserRestrictor, Option } from '../js/components/UserRestrictor';
import { Login } from '../js/components/Login.js';
import React from 'react';
import { connect } from 'react-redux';
import Head from 'next/head';
import React from 'react';
import { connect } from 'react-redux';
import {
Button,
@ -20,11 +15,14 @@ import {
Label
} from 'reactstrap';
import {
verifyCredentials
} from '../js/api';
import { TurniereNavigation } from '../js/components/Navigation';
import { Footer } from '../js/components/Footer';
import { UserRestrictor, Option } from '../js/components/UserRestrictor';
import { Login } from '../js/components/Login';
import { verifyCredentials } from '../js/api';
import EditableStringList from '../js/components/EditableStringList';
import EditableStringList from '../js/components/EditableStringList';
import '../static/everypage.css';
class PrivateCreatePage extends React.Component {

View File

@ -1,15 +1,15 @@
import Head from 'next/head';
import React from 'react';
import {Col, Container, Row} from 'reactstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer.js';
import '../static/everypage.css';
import Head from 'next/head';
import React from 'react';
import { Col, Container, Row } from 'reactstrap';
import {
verifyCredentials
} from '../js/api';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer';
import { verifyCredentials } from '../js/api';
import 'bootstrap/dist/css/bootstrap.min.css';
import '../static/everypage.css';
function Main() {
return (

View File

@ -1,15 +1,14 @@
import Head from 'next/head';
import React from 'react';
import {Container} from 'reactstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer.js';
import '../static/everypage.css';
import Head from 'next/head';
import React from 'react';
import { Container } from 'reactstrap';
import {
verifyCredentials
} from '../js/api';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer';
import { verifyCredentials } from '../js/api';
import 'bootstrap/dist/css/bootstrap.min.css';
import '../static/everypage.css';
function Main() {
return (

View File

@ -1,23 +1,25 @@
import Head from 'next/head';
import React from 'react';
import { Alert, Button, Card, CardBody } from 'reactstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
import Head from 'next/head';
import React from 'react';
import { connect } from 'react-redux';
import {
Alert,
Button,
Card,
CardBody
} from 'reactstrap';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer.js';
import '../static/everypage.css';
import '../static/css/index.css';
import { connect } from 'react-redux';
import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer';
import {
verifyCredentials
} from '../js/api';
import 'bootstrap/dist/css/bootstrap.min.css';
import '../static/everypage.css';
import '../static/css/index.css';
function Main() {
return (
<div className="main">

View File

@ -1,9 +1,13 @@
import Head from 'next/head';
import React from 'react';
import { Card, CardBody, Container } from 'reactstrap';
import Head from 'next/head';
import React from 'react';
import {
Card,
CardBody,
Container
} from 'reactstrap';
import { TurniereNavigation } from '../js/components/Navigation';
import { Footer } from '../js/components/Footer.js';
import { Footer } from '../js/components/Footer';
import {
getRequest,
getState,

View File

@ -1,13 +1,12 @@
import Head from 'next/head';
import '../static/everypage.css';
import { TurniereNavigation } from '../js/components/Navigation';
import { Footer } from '../js/components/Footer.js';
import { Login } from '../js/components/Login.js';
import React from 'react';
import Head from 'next/head';
import React from 'react';
import {
verifyCredentials
} from '../js/api';
import { TurniereNavigation } from '../js/components/Navigation';
import { Footer } from '../js/components/Footer';
import { Login } from '../js/components/Login';
import { verifyCredentials } from '../js/api';
import '../static/everypage.css';
export default class LoginPage extends React.Component {

View File

@ -1,15 +1,15 @@
import Head from 'next/head';
import React from 'react';
import {Container} from 'reactstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer.js';
import '../static/everypage.css';
import Head from 'next/head';
import React from 'react';
import { Container } from 'reactstrap';
import {
verifyCredentials
} from '../js/api';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { Footer } from '../js/components/Footer';
import { verifyCredentials } from '../js/api';
import 'bootstrap/dist/css/bootstrap.min.css';
import '../static/everypage.css';
function Main() {
return (

View File

@ -1,15 +1,24 @@
import Head from 'next/head';
import '../static/everypage.css';
import { TurniereNavigation } from '../js/components/Navigation';
import { Footer } from '../js/components/Footer.js';
import React from 'react';
import { Button, Card, CardBody, Container, Form, FormGroup, FormText, Input, Label } from 'reactstrap';
import { register } from '../js/api';
import { connect } from 'react-redux';
import Head from 'next/head';
import React from 'react';
import { connect } from 'react-redux';
import {
verifyCredentials
} from '../js/api';
Button,
Card,
CardBody,
Container,
Form,
FormGroup,
FormText,
Input,
Label
} from 'reactstrap';
import { TurniereNavigation } from '../js/components/Navigation';
import { Footer } from '../js/components/Footer';
import { register } from '../js/api';
import { verifyCredentials } from '../js/api';
import '../static/everypage.css';
export default class RegisterPage extends React.Component {

View File

@ -1,17 +1,7 @@
import Head from 'next/head';
import React from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
import { connect } from 'react-redux';
import { notify } from 'react-notify-toast';
import { requestTournament } from '../js/api';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { UserRestrictor, Option } from '../js/components/UserRestrictor.js';
import { Footer } from '../js/components/Footer.js';
import { Login } from '../js/components/Login.js';
import { ErrorPageComponent } from '../js/components/ErrorComponents.js';
import Head from 'next/head';
import React from 'react';
import { connect } from 'react-redux';
import { notify } from 'react-notify-toast';
import {
Container,
Button,
@ -20,11 +10,20 @@ import {
Table
} from 'reactstrap';
import { requestTournament } from '../js/api';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import { UserRestrictor, Option } from '../js/components/UserRestrictor';
import { Footer } from '../js/components/Footer';
import { Login } from '../js/components/Login';
import { ErrorPageComponent } from '../js/components/ErrorComponents';
import {
verifyCredentials,
updateTeamName
} from '../js/api';
import 'bootstrap/dist/css/bootstrap.min.css';
import '../static/everypage.css';
import '../static/css/index.css';

View File

@ -1,4 +1,4 @@
import Head from 'next/head';
import Head from 'next/head';
import React from 'react';
import {

View File

@ -1,5 +1,6 @@
import Head from 'next/head';
import React from 'react';
import Head from 'next/head';
import React from 'react';
import { connect } from 'react-redux';
import {
Button,
Card,
@ -18,21 +19,22 @@ import {
Row,
Table
} from 'reactstrap';
import { ErrorPageComponent } from '../js/components/ErrorComponents.js';
import { Footer } from '../js/components/Footer.js';
import 'bootstrap/dist/css/bootstrap.min.css';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import '../static/everypage.css';
import '../static/css/tournament.css';
import { connect } from 'react-redux';
import { ErrorPageComponent } from '../js/components/ErrorComponents';
import { Footer } from '../js/components/Footer';
import { TurniereNavigation } from '../js/components/Navigation';
import { BigImage } from '../js/components/BigImage';
import {
getRequest,
getState,
verifyCredentials
} from '../js/api';
import 'bootstrap/dist/css/bootstrap.min.css';
import '../static/everypage.css';
import '../static/css/tournament.css';
class TournamentPage extends React.Component {
render() {