Skip to content
Snippets Groups Projects
Commit cf4331af authored by Barnabás Czémán's avatar Barnabás Czémán
Browse files

Merge branch 'master' of github.com:DevTeamSCH/kszkepzes-frontend

parents d03158d8 07e5f953
No related branches found
No related tags found
No related merge requests found
...@@ -14,10 +14,14 @@ export const getUserData = () => ( ...@@ -14,10 +14,14 @@ export const getUserData = () => (
const { const {
id, join_date: joinDate, nick, motivation, signed, groups, id, join_date: joinDate, nick, motivation, signed, groups,
} = user.data; } = user.data;
const motivationJSON = JSON.parse(motivation);
const motivationAbout = motivationJSON.first;
const motivationProfession = motivationJSON.second;
const motivationExercise = motivationJSON.third;
dispatch({ dispatch({
type: GET_USERDATA, type: GET_USERDATA,
payload: { payload: {
id, joinDate, nick, motivation, signed, groups, id, joinDate, nick, motivationAbout, motivationProfession, motivationExercise, signed, groups,
}, },
}); });
} }
...@@ -51,7 +55,7 @@ export const submitRegistration = ({ ...@@ -51,7 +55,7 @@ export const submitRegistration = ({
}) => ( }) => (
async (dispatch) => { async (dispatch) => {
const response = await axios.patch(`/api/v1/profiles/${id}/`, { const response = await axios.patch(`/api/v1/profiles/${id}/`, {
nick, groups, signed, motivationAbout, motivationProfession, motivationExercise, nick, groups, signed, motivation: JSON.stringify({ first: motivationAbout, second: motivationProfession, third: motivationExercise }),
}); });
if (response.data.id === id) { if (response.data.id === id) {
alert('Sikeres mentés!'); alert('Sikeres mentés!');
...@@ -65,7 +69,7 @@ export const logout = () => ( ...@@ -65,7 +69,7 @@ export const logout = () => (
async (dispatch) => { async (dispatch) => {
const response = await axios.get('/api/v1/logout/'); const response = await axios.get('/api/v1/logout/');
if (response) { if (response) {
dispatch({ action: LOGOUT }); dispatch({ type: LOGOUT });
} }
} }
); );
...@@ -24,6 +24,7 @@ const settings = { ...@@ -24,6 +24,7 @@ const settings = {
slidesToShow: 1, slidesToShow: 1,
slidesToScroll: 1, slidesToScroll: 1,
centerMode: true, centerMode: true,
lazyLoad: true,
}; };
const range = (count) => { const range = (count) => {
......
...@@ -8,7 +8,7 @@ import 'semantic-ui-css/semantic.min.css'; ...@@ -8,7 +8,7 @@ import 'semantic-ui-css/semantic.min.css';
import configureStore from './configureStore'; import configureStore from './configureStore';
import App from './components/App'; import App from './components/App';
// import registerServiceWorker from './registerServiceWorker'; import registerServiceWorker from './registerServiceWorker';
const store = configureStore(); const store = configureStore();
...@@ -21,4 +21,4 @@ render( ...@@ -21,4 +21,4 @@ render(
document.getElementById('root'), document.getElementById('root'),
); );
// registerServiceWorker(); 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