Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
shopping-mall
Commits
071ec763
Commit
071ec763
authored
Feb 01, 2021
by
Jiwon Yoon
Browse files
로컬 빼빼
parent
458982e1
Changes
2
Show whitespace changes
Inline
Side-by-side
client/src/Pages/Payment.js
View file @
071ec763
...
...
@@ -36,10 +36,15 @@ function Payment({ match, location }) {
},
[
cart
])
async
function
getUser
()
{
const
name
=
localStorage
.
getItem
(
'
name
'
)
const
tel
=
localStorage
.
getItem
(
'
tel
'
)
const
email
=
localStorage
.
getItem
(
'
email
'
)
try
{
const
response
=
await
axios
.
get
(
`/api/users/account/
${
user
}
`
)
console
.
log
(
response
.
data
)
const
{
name
,
tel
,
email
}
=
response
.
data
setUserData
({
name
:
name
,
tel
:
tel
,
email
:
email
})
}
catch
(
error
)
{
catchErrors
(
error
,
setError
)
}
// setUserData({ name: name, tel: tel, email: email })
}
async
function
getCart
()
{
...
...
client/src/utils/auth.js
View file @
071ec763
...
...
@@ -3,9 +3,6 @@ import axios from "axios";
export
function
handleLogin
({
userId
,
role
,
name
,
tel
,
email
})
{
localStorage
.
setItem
(
'
id
'
,
userId
)
localStorage
.
setItem
(
'
role
'
,
role
)
localStorage
.
setItem
(
'
name
'
,
name
)
localStorage
.
setItem
(
'
tel
'
,
tel
)
localStorage
.
setItem
(
'
email
'
,
email
)
}
export
async
function
handleLogout
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment