Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김건희
/
OSSW_Weather_Briefing
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김건희
2022-05-22 17:56:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ec93f83010a21fa45789d3327e6254088b2512e0
ec93f830
1 parent
1f7dfca8
[Update] Login, Register Files
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
weather_briefing/src/component/views/LoginPage/LoginPage.js
weather_briefing/src/modules/user.js
weather_briefing/src/component/views/LoginPage/LoginPage.js
View file @
ec93f83
...
...
@@ -63,7 +63,7 @@ function LoginPage(props) {
dispatch
(
login
(
UserData
))
.
then
(
res
=>
{
if
(
res
.
payload
.
log
ged
)
{
if
(
res
.
payload
.
log
inSuccess
)
{
props
.
history
.
push
(
'/register'
);
}
else
{
alert
(
res
.
payload
.
error
);
...
...
weather_briefing/src/modules/user.js
View file @
ec93f83
...
...
@@ -31,13 +31,13 @@ export function login(data) {
}
};
export
default
function
(
state
=
InitialState
,
action
)
{
export
default
function
(
state
=
{}
,
action
)
{
switch
(
action
.
type
)
{
case
REGISTER
:
return
{...
state
,
register
:
action
.
payload
};
return
{...
state
,
success
:
action
.
payload
};
break
;
case
LOGIN
:
return
{...
state
,
log
ged
:
action
.
payload
};
return
{...
state
,
log
inSuccess
:
action
.
payload
};
break
;
default
:
return
state
;
...
...
Please
register
or
login
to post a comment