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
fbf1334a
Commit
fbf1334a
authored
Jul 28, 2021
by
seoyeon
Browse files
Merge remote-tracking branch 'origin/jaeyeoniiiiii' into seoyeon2
parents
6d3794cb
1f443ad8
Changes
5
Hide whitespace changes
Inline
Side-by-side
client/src/components/Home/CreateRoom.js
View file @
fbf1334a
...
...
@@ -4,7 +4,6 @@ import roomApi from "../../apis/room.api";
import
catchErrors
from
"
../../context/catchError
"
;
const
userId
=
localStorage
.
getItem
(
'
user
'
);
console
.
log
(
userId
)
const
INIT_ROOM
=
{
name
:
''
,
owner
:
userId
,
...
...
client/src/components/Home/HomeProfile.js
View file @
fbf1334a
...
...
@@ -4,7 +4,6 @@ import userApi from "../../apis/user.api";
import
catchErrors
from
"
../../context/catchError
"
;
const
userprofile
=
localStorage
.
getItem
(
"
user
"
);
console
.
log
(
userprofile
)
const
INIT_USER
=
{
id
:
userprofile
,
name
:
''
,
...
...
client/src/components/Profile/Info.js
View file @
fbf1334a
...
...
@@ -16,7 +16,6 @@ const Info = () => {
try
{
const
data
=
await
userApi
.
getUser
({
id
:
userID
});
setProfile
(
data
);
console
.
log
(
data
)
}
catch
(
error
)
{}
}
useEffect
(()
=>
{
...
...
client/src/components/Profile/InfoUpdate.js
View file @
fbf1334a
...
...
@@ -3,7 +3,6 @@ import React, { useEffect, useState } from "react";
import
userApi
from
"
../../apis/user.api
"
;
const
userprofile
=
localStorage
.
getItem
(
"
user
"
);
console
.
log
(
userprofile
);
const
INIT_PROFILE
=
{
id
:
userprofile
,
name
:
""
,
...
...
@@ -22,7 +21,6 @@ const InfoUpdate = () => {
try
{
const
data
=
await
userApi
.
getUser
({
id
:
userID
});
setProfile
(
data
);
console
.
log
(
data
);
}
catch
(
error
)
{}
}
...
...
@@ -37,7 +35,6 @@ const InfoUpdate = () => {
formData
.
append
(
"
id
"
,
userprofile
);
try
{
const
res
=
await
userApi
.
profileimg
(
formData
);
console
.
log
(
res
);
if
(
files
){
setProfile
({...
profile
,
img
:
res
})
}
else
{
...
...
@@ -46,13 +43,11 @@ const InfoUpdate = () => {
};
const
changeinfo
=
async
(
event
)
=>
{
console
.
log
(
profile
);
const
res
=
await
userApi
.
updateinfo
(
profile
)
};
const
updateinfo
=
(
event
)
=>
{
const
{
name
,
value
}
=
event
.
target
;
setProfile
({
...
profile
,
[
name
]:
value
});
console
.
log
(
profile
);
};
const
{
email
,
phone
,
name
}
=
profile
...
...
client/src/components/Profile/Profile.js
View file @
fbf1334a
...
...
@@ -15,7 +15,6 @@ const Profile = () => {
async
function
getProfile
(
userID
)
{
try
{
const
data
=
await
userApi
.
getUser
({
id
:
userID
});
console
.
log
(
data
.
img
)
setProfile
(
data
.
img
)
}
catch
(
error
)
{}
...
...
@@ -26,7 +25,6 @@ const Profile = () => {
const
{
id
}
=
useParams
();
console
.
log
(
id
);
return
(
<
div
className
=
"
container
"
style
=
{{
background
:
"
#FCF4FF
"
}}
>
...
...
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