diff --git a/src/actions/auth.js b/src/actions/auth.js index f3179070d7dd101ac6e44cf2cefb455239aa72a3..eecdebab3de10ac494dc29f21da369454f76454a 100644 --- a/src/actions/auth.js +++ b/src/actions/auth.js @@ -9,8 +9,15 @@ const axios = ax.create({ export const getUserData = () => ( async (dispatch) => { const user = await axios.get('/api/v1/profiles/me'); - const { id, join_date: joinDate, nick, motivation, signed, groups } = user.data; - dispatch({ type: GET_USERDATA, payload: { id, joinDate, nick, motivation, signed, groups } }); + const { + id, join_date: joinDate, nick, motivation, signed, groups, + } = user.data; + dispatch({ + type: GET_USERDATA, + payload: { + id, joinDate, nick, motivation, signed, groups, + }, + }); } ); @@ -24,7 +31,9 @@ export const groupChange = groups => ( dispatch => (dispatch({ type: GROUP_CHANGE, payload: groups })) ); -export const submitRegistration = ({ nick, groups, signed, motivation, id }) => ( +export const submitRegistration = ({ + nick, groups, signed, motivation, id, +}) => ( async (dispatch) => { const response = await axios.patch(`/api/v1/profiles/${id}/`, { nick, groups, signed, motivation, diff --git a/src/components/App.js b/src/components/App.js index b490987f6737188f6a9d1b2eefe13fe81a88140e..40766cef9e4dc5e369cd91108df671be9908dbed 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -1,7 +1,7 @@ -import React from "react"; -import Header from "./Header"; -import Main from "./Main"; -import Footer from "./Footer"; +import React from 'react'; +import Header from './Header'; +import Main from './Main'; +import Footer from './Footer'; const App = () => ( <div> diff --git a/src/components/Footer.js b/src/components/Footer.js index 98853abb24d6370d1d23566673595f87420acc97..7613f4cda02e7f352e4422da557c06f9820f4ac8 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -1,10 +1,10 @@ -import React from "react"; -import { Container, Segment } from "semantic-ui-react"; +import React from 'react'; +import { Container, Segment } from 'semantic-ui-react'; const Footer = () => ( - <Segment inverted vertical textAlign="center"> + <Segment inverted vertical textAlign='center'> <Container> - <p textalign="center">Created by DevTeam © 2017-2018.</p> + <p textalign='center'>Created by DevTeam © 2017-2018.</p> </Container> </Segment> ); diff --git a/src/components/Main.js b/src/components/Main.js index 33a6270c4b7f39bb092fd1fe84914edf83ad4626..dfc391debf8dde4eaf090c7708f0656275ebc57e 100644 --- a/src/components/Main.js +++ b/src/components/Main.js @@ -1,6 +1,5 @@ import React from 'react'; -import { Switch, Route, Redirect } from 'react-router-dom'; -import { withRouter } from 'react-router' +import { Switch, Route, Redirect, withRouter } from 'react-router-dom'; import Home from './pages/Home'; import Trainers from './pages/Trainers'; import Schedule from './pages/Schedule'; diff --git a/src/components/pages/Circles.js b/src/components/pages/Circles.js index 69cb2a38dae6637e34b98af2ef369059b98c3b27..96daca5f6e6af4975b68c9ec696a9ad2de3471a2 100644 --- a/src/components/pages/Circles.js +++ b/src/components/pages/Circles.js @@ -1,21 +1,21 @@ -import React, { Component } from "react"; -import { Container, Header, Segment } from "semantic-ui-react"; +import React, { Component } from 'react'; +import { Container, Header, Segment } from 'semantic-ui-react'; export default class Circles extends Component { render() { return ( <div> - <Segment inverted textAlign="center" vertical> + <Segment inverted textAlign='center' vertical> <Container> <Header - as="h1" - content="KĂśrĂśk - TODO" + as='h1' + content='KĂśrĂśk - Hamarosan' inverted style={{ - fontSize: "3em", - fontWeight: "normal", + fontSize: '3em', + fontWeight: 'normal', marginBottom: 0, - marginTop: "0.5em" + marginTop: '0.5em', }} /> </Container> diff --git a/src/components/pages/NotFound.js b/src/components/pages/NotFound.js index bda256c2606875e4dab2527455d1b2b3d3c93f30..be13943bd948edba928aa779ecbedd542b0e20aa 100644 --- a/src/components/pages/NotFound.js +++ b/src/components/pages/NotFound.js @@ -1,35 +1,35 @@ -import React, { Component } from "react"; -import { Button, Container, Header, Icon, Segment } from "semantic-ui-react"; +import React, { Component } from 'react'; +import { Button, Container, Header, Icon, Segment } from 'semantic-ui-react'; export default class NotFound extends Component { render() { return ( <div> - <Segment inverted textAlign="center" vertical> + <Segment inverted textAlign='center' vertical> <Container> <Header - as="h1" - content="404 - A keresett oldal nem talĂĄlhatĂł!" + as='h1' + content='404 - A keresett oldal nem talĂĄlhatĂł!' inverted style={{ - fontSize: "3em", - fontWeight: "normal", + fontSize: '3em', + fontWeight: 'normal', marginBottom: 0, - marginTop: "0.5em" + marginTop: '0.5em', }} /> <Button - href="/" + href='/' primary - size="huge" + size='huge' style={{ - fontSize: "2em", - marginTop: "1em", - marginBottom: "1em" + fontSize: '2em', + marginTop: '1em', + marginBottom: '1em', }} > Vissza a FĹoldalra - <Icon name="right arrow" /> + <Icon name='right arrow' /> </Button> </Container> </Segment> diff --git a/src/components/pages/Profile.js b/src/components/pages/Profile.js index 3850ab7b97b5b42e8c7448972801732352fe3686..0389ad99bbfb410b655d4bec1cf93a469e8317cc 100644 --- a/src/components/pages/Profile.js +++ b/src/components/pages/Profile.js @@ -19,7 +19,9 @@ class Profile extends Component { } render() { - const { nick, groups, motivation, signed, id } = this.props; + const { + nick, groups, motivation, signed, id, + } = this.props; return ( <div> <Segment textAlign='center' vertical> @@ -55,12 +57,14 @@ class Profile extends Component { <Form.Checkbox name='signed' label='SzeretnĂŠk jelentkezni a KSZK-ba' - onChange={(_, v) => this.props.textChange({ target: { name: v.name, value: v.checked } })} + onChange={(_, v) => + this.props.textChange({ target: { name: v.name, value: v.checked } }) + } checked={signed} /> <Form.Button onClick={() => this.props.submitRegistration({ - nick, motivation, signed, groups, id + nick, motivation, signed, groups, id, })} > MentĂŠs @@ -73,14 +77,16 @@ class Profile extends Component { } } -const mapStateToProps = ({ user: { nick, groups, motivation, signed, id } }) => { - return { - nick, - groups, - motivation, - signed, - id, - }; -}; +const mapStateToProps = ({ + user: { + nick, groups, motivation, signed, id, + }, +}) => ({ + nick, + groups, + motivation, + signed, + id, +}); export default connect(mapStateToProps, { textChange, submitRegistration, groupChange })(Profile); diff --git a/src/components/pages/Schedule.js b/src/components/pages/Schedule.js index 70886ae6694c78ed74518679f30d9e16da9e643c..d6a6ac619ed242e3c78a0af5d41896f4c227df90 100644 --- a/src/components/pages/Schedule.js +++ b/src/components/pages/Schedule.js @@ -1,21 +1,21 @@ -import React, { Component } from "react"; -import { Container, Header, Segment } from "semantic-ui-react"; +import React, { Component } from 'react'; +import { Container, Header, Segment } from 'semantic-ui-react'; export default class Schedule extends Component { render() { return ( <div> - <Segment inverted textAlign="center" vertical> + <Segment inverted textAlign='center' vertical> <Container> <Header - as="h1" - content="Ătemterv - TODO" + as='h1' + content='Ătemterv - Hamarosan' inverted style={{ - fontSize: "3em", - fontWeight: "normal", + fontSize: '3em', + fontWeight: 'normal', marginBottom: 0, - marginTop: "0.5em" + marginTop: '0.5em', }} /> </Container> diff --git a/src/components/pages/Statistics.js b/src/components/pages/Statistics.js index 266156987f08a458359d7158e87456459eef5755..3c2baaf2395b0ef0385e2489547586c34430228d 100644 --- a/src/components/pages/Statistics.js +++ b/src/components/pages/Statistics.js @@ -1,21 +1,21 @@ -import React, { Component } from "react"; -import { Container, Header, Segment } from "semantic-ui-react"; +import React, { Component } from 'react'; +import { Container, Header, Segment } from 'semantic-ui-react'; export default class Statistics extends Component { render() { return ( <div> - <Segment inverted textAlign="center" vertical> + <Segment inverted textAlign='center' vertical> <Container> <Header - as="h1" - content="StatisztikĂĄk - TODO" + as='h1' + content='StatisztikĂĄk - Hamarosan' inverted style={{ - fontSize: "3em", - fontWeight: "normal", + fontSize: '3em', + fontWeight: 'normal', marginBottom: 0, - marginTop: "0.5em" + marginTop: '0.5em', }} /> </Container> diff --git a/src/components/pages/Trainers.js b/src/components/pages/Trainers.js index 022eed39d288bc68abbeead1101cf648f8cec425..ef2ec5c21febd6ad6c8748125fe8ce04d3b6c3b1 100644 --- a/src/components/pages/Trainers.js +++ b/src/components/pages/Trainers.js @@ -1,21 +1,21 @@ -import React, { Component } from "react"; -import { Container, Header, Segment } from "semantic-ui-react"; +import React, { Component } from 'react'; +import { Container, Header, Segment } from 'semantic-ui-react'; export default class Trainers extends Component { render() { return ( <div> - <Segment inverted textAlign="center" vertical> + <Segment inverted textAlign='center' vertical> <Container> <Header - as="h1" - content="KĂŠpzĹk - TODO" + as='h1' + content='KĂŠpzĹk - Hamarosan' inverted style={{ - fontSize: "3em", - fontWeight: "normal", + fontSize: '3em', + fontWeight: 'normal', marginBottom: 0, - marginTop: "0.5em" + marginTop: '0.5em', }} /> </Container> diff --git a/src/index.css b/src/index.css deleted file mode 100644 index b4cc7250b98cb3f1a2dd5bec134296c6942344d9..0000000000000000000000000000000000000000 --- a/src/index.css +++ /dev/null @@ -1,5 +0,0 @@ -body { - margin: 0; - padding: 0; - font-family: sans-serif; -} diff --git a/src/index.js b/src/index.js index 40c3ab4676cdc5ce7435e4578b5553de45a0a369..350009f7b3099c017d45d5e4a5356234736a188f 100644 --- a/src/index.js +++ b/src/index.js @@ -5,7 +5,6 @@ import { BrowserRouter as Router } from 'react-router-dom'; import 'semantic-ui-css/semantic.min.css'; import configureStore from './configureStore'; -import './index.css'; import App from './components/App'; import registerServiceWorker from './registerServiceWorker';