Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kszkepzes-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Köpeczi-Bócz Gergely
kszkepzes-frontend
Commits
cf4331af
Commit
cf4331af
authored
7 years ago
by
Barnabás Czémán
Browse files
Options
Downloads
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/actions/auth.js
+7
-3
7 additions, 3 deletions
src/actions/auth.js
src/components/pages/Home.js
+1
-0
1 addition, 0 deletions
src/components/pages/Home.js
src/index.js
+2
-2
2 additions, 2 deletions
src/index.js
with
10 additions
and
5 deletions
src/actions/auth.js
+
7
−
3
View file @
cf4331af
...
@@ -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
,
motivation
About
,
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
,
motivation
About
,
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
});
}
}
}
}
);
);
This diff is collapsed.
Click to expand it.
src/components/pages/Home.js
+
1
−
0
View file @
cf4331af
...
@@ -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
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/index.js
+
2
−
2
View file @
cf4331af
...
@@ -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
();
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment