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