Commit 1f443ad8 authored by 이재연's avatar 이재연
Browse files

오오옹ㅇ~~

parent a79f18a8
......@@ -3,7 +3,6 @@ import { Redirect } from "react-router-dom";
import roomApi from "../../apis/room.api";
const userId = localStorage.getItem('user');
console.log(userId)
const INIT_ROOM = {
name: '',
owner: userId,
......
......@@ -3,7 +3,6 @@ import { useState, useEffect } from "react";
import userApi from "../../apis/user.api";
const userprofile = localStorage.getItem("user");
console.log(userprofile)
const INIT_USER = {
id: userprofile,
name: '',
......
......@@ -16,7 +16,6 @@ const Info = () => {
try {
const data = await userApi.getUser({id:userID});
setProfile(data);
console.log(data)
} catch (error) {}
}
useEffect(() => {
......
......@@ -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
......
......@@ -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" }}>
......
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