Commit 0c9e67ad authored by 이재연's avatar 이재연
Browse files

d

parent 1f443ad8
...@@ -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()
......
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment