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
bora-it
Commits
0c9e67ad
Commit
0c9e67ad
authored
Jul 28, 2021
by
이재연
Browse files
d
parent
1f443ad8
Changes
4
Show whitespace changes
Inline
Side-by-side
client/src/components/Home/CreateRoom.js
View file @
0c9e67ad
...
@@ -26,7 +26,6 @@ const CreateRoom = () => {
...
@@ -26,7 +26,6 @@ const CreateRoom = () => {
const
{
name
,
value
}
=
event
.
target
const
{
name
,
value
}
=
event
.
target
setRoom
({
...
room
,
[
name
]:
value
})
setRoom
({
...
room
,
[
name
]:
value
})
}
}
console
.
log
(
room
)
async
function
handleSubmit
(
e
)
{
async
function
handleSubmit
(
e
)
{
e
.
preventDefault
()
e
.
preventDefault
()
...
...
client/src/components/Home/HomeProfile.js
View file @
0c9e67ad
...
@@ -5,7 +5,7 @@ import userApi from "../../apis/user.api";
...
@@ -5,7 +5,7 @@ import userApi from "../../apis/user.api";
const
userprofile
=
localStorage
.
getItem
(
"
user
"
);
const
userprofile
=
localStorage
.
getItem
(
"
user
"
);
const
INIT_USER
=
{
const
INIT_USER
=
{
id
:
userprofile
,
id
:
userprofile
,
name
:
''
,
email
:
''
,
img
:
''
,
img
:
''
,
}
}
...
@@ -14,19 +14,14 @@ const HomeProfile = () => {
...
@@ -14,19 +14,14 @@ const HomeProfile = () => {
async
function
getSetUser
(
userID
)
{
async
function
getSetUser
(
userID
)
{
try
{
try
{
// `/users/${userId}`랑 userId랑 같은지 확인
console
.
log
(
'
userID
'
,
userID
)
const
data
=
await
userApi
.
getUser
({
id
:
userID
})
const
data
=
await
userApi
.
getUser
({
id
:
userID
})
console
.
log
(
data
)
setUser
(
data
)
setUser
(
data
)
console
.
log
(
user
)
}
catch
(
error
)
{
}
catch
(
error
)
{
// catchErrors(error, setError)
// catchErrors(error, setError)
}
}
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
'
예에에에에ㅔ에에
'
)
getSetUser
(
userprofile
)
getSetUser
(
userprofile
)
},
[
userprofile
])
},
[
userprofile
])
...
@@ -44,7 +39,7 @@ const HomeProfile = () => {
...
@@ -44,7 +39,7 @@ const HomeProfile = () => {
// value={user.img}
// value={user.img}
/
>
/
>
<
/div
>
<
/div
>
<
h1
className
=
"
d-flex justify-content-center
"
>
{
user
.
name
}
<
/h1
>
<
h1
className
=
"
d-flex justify-content-center
"
>
{
user
.
email
}
<
/h1
>
<
h2
className
=
"
d-flex justify-content-center
"
>
#
{
user
.
id
}
<
/h2
>
<
h2
className
=
"
d-flex justify-content-center
"
>
#
{
user
.
id
}
<
/h2
>
<
/form
>
<
/form
>
<
div
<
div
...
...
uploads/5330f856a410fb2c064a20b189f135af
0 → 100644
View file @
0c9e67ad
File added
uploads/7a018568ffaeda940051ba13ddaf34b9
0 → 100644
View file @
0c9e67ad
File added
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