Skip to content
Snippets Groups Projects
Commit 974b77ec authored by Tamás Szabó's avatar Tamás Szabó
Browse files

fixed lint errors

parent 37f53ecf
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
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>
......
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 &copy; 2017-2018.</p>
<p textalign='center'>Created by DevTeam &copy; 2017-2018.</p>
</Container>
</Segment>
);
......
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';
......
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>
......
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>
......
......@@ -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);
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>
......
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>
......
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>
......
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
......@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment