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

d

parent 1f443ad8
......@@ -26,7 +26,6 @@ const CreateRoom = () => {
const { name, value } = event.target
setRoom({ ...room, [name]: value })
}
console.log(room)
async function handleSubmit(e) {
e.preventDefault()
......
......@@ -5,7 +5,7 @@ import userApi from "../../apis/user.api";
const userprofile = localStorage.getItem("user");
const INIT_USER = {
id: userprofile,
name: '',
email: '',
img: '',
}
......@@ -14,19 +14,14 @@ const HomeProfile = () => {
async function getSetUser(userID) {
try {
// `/users/${userId}`랑 userId랑 같은지 확인
console.log('userID',userID)
const data = await userApi.getUser({id: userID})
console.log(data)
setUser(data)
console.log(user)
} catch (error) {
// catchErrors(error, setError)
}
}
useEffect(() => {
console.log('예에에에에ㅔ에에')
getSetUser(userprofile)
}, [userprofile])
......@@ -44,7 +39,7 @@ const HomeProfile = () => {
// value={user.img}
/>
</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>
</form>
<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