Commit fbf1334a authored by seoyeon's avatar seoyeon
Browse files

Merge remote-tracking branch 'origin/jaeyeoniiiiii' into seoyeon2

parents 6d3794cb 1f443ad8
...@@ -4,7 +4,6 @@ import roomApi from "../../apis/room.api"; ...@@ -4,7 +4,6 @@ import roomApi from "../../apis/room.api";
import catchErrors from "../../context/catchError"; import catchErrors from "../../context/catchError";
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,
......
...@@ -4,7 +4,6 @@ import userApi from "../../apis/user.api"; ...@@ -4,7 +4,6 @@ import userApi from "../../apis/user.api";
import catchErrors from "../../context/catchError"; import catchErrors from "../../context/catchError";
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: '',
......
...@@ -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(() => {
......
...@@ -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
......
...@@ -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" }}>
......
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