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