Commit 9d3de10a authored by Kim, Chaerin's avatar Kim, Chaerin
Browse files

warning-yellow fix

parent 3e9c534c
...@@ -11,7 +11,7 @@ const Header = () => { ...@@ -11,7 +11,7 @@ const Header = () => {
<div className="d-flex justify-content-end"> <div className="d-flex justify-content-end">
<div> <div>
<Link to="/user"> <Link to="/user">
<img src="/BORA.png" style={{ width: '160px' }} /> <img src="/BORA.png" alt="logo" style={{ width: '160px' }} />
</Link> </Link>
</div> </div>
<button <button
......
...@@ -3,37 +3,34 @@ import { useState, useEffect } from "react"; ...@@ -3,37 +3,34 @@ import { useState, useEffect } from "react";
import userApi from "../../apis/user.api"; import userApi from "../../apis/user.api";
import catchErrors from "../../context/catchError"; import catchErrors from "../../context/catchError";
const userprofile = localStorage.getItem("user");
const INIT_USER = { const INIT_USER = {
id: userprofile, id: localStorage.getItem("user"),
email: '', email: "",
img: '', img: "",
} };
const HomeProfile = () => { const HomeProfile = () => {
const [user, setUser] = useState(INIT_USER) const [user, setUser] = useState(INIT_USER);
async function getSetUser(userID) { async function getSetUser(userID) {
try { try {
console.log('userID', userID) const data = await userApi.getUser(userID);
const data = await userApi.getUser(userID) setUser(data);
console.log(data)
setUser(data)
// console.log(user)
} catch (error) { } catch (error) {
// catchErrors(error, setError) // catchErrors(error, setError)
} }
} }
useEffect(() => { useEffect(() => {
getSetUser(userprofile) getSetUser(user.id);
}, [userprofile]) }, []);
return ( return (
<Link to={`/profile/${user.id}`} className="text-decoration-none text-dark"> <Link to={`/profile/${user.id}`} className="text-decoration-none text-dark">
<form className="flex-column align-items-center justify-content-center m-2"> <form className="flex-column align-items-center justify-content-center m-2">
<div className="d-flex justify-content-center"> <div className="d-flex justify-content-center">
<img <img
alt="homeProfileImg"
src={`/uploads/${user.img}`} src={`/uploads/${user.img}`}
className="rounded-circle" className="rounded-circle"
style={{ style={{
......
import { useEffect, useState } from 'react'; import { useEffect, useState } from "react";
import { Link } from 'react-router-dom' import { Link } from "react-router-dom";
import roomApi from '../../apis/room.api'; import roomApi from "../../apis/room.api";
import userApi from '../../apis/user.api'; import userApi from "../../apis/user.api";
const RoomSingle = () => { const RoomSingle = () => {
const [roomNum, setRoomNum] = useState('') const [roomNum, setRoomNum] = useState("");
const [room, setRoom] = useState([]) const [room, setRoom] = useState([]);
const roomId = localStorage.getItem('user'); const roomId = localStorage.getItem("user");
const channelId = 1 const channelId = 1;
const A = [] const A = [];
// async function getJoinRoom(Id) { // async function getJoinRoom(Id) {
// try { // try {
...@@ -35,31 +35,31 @@ const RoomSingle = () => { ...@@ -35,31 +35,31 @@ const RoomSingle = () => {
> >
<div <div
className="d-flex mx-4 my-2 p-2" className="d-flex mx-4 my-2 p-2"
style={{ backgroundColor: '#C4C4C4' }} style={{ backgroundColor: "#C4C4C4" }}
> >
<div style={{ width: '37px', height: '37px' }}> <div style={{ width: "37px", height: "37px" }}>
<img <img
alt="roomImg"
src="BORA.png" src="BORA.png"
className="rounded-circle" className="rounded-circle"
style={{ width: '37px', height: '37px' }} style={{ width: "37px", height: "37px" }}
/> />
</div> </div>
<div <div
className="mx-3 mt-2" className="mx-3 mt-2"
style={{ style={{
width: '250px', width: "250px",
overflow:'scroll', overflow: "scroll",
whiteSpace: 'nowrap', whiteSpace: "nowrap",
msOverflowStyle:'none', msOverflowStyle: "none",
}} }}
> >
데계 재미있는 수학과 데계데계데계 재미있는 수학과 데계 재미있는 수학과 데계데계데계 재미있는 수학과
</div> </div>
<div className="ms-auto mt-2"> 15/34 </div> <div className="ms-auto mt-2"> 15/34 </div>
</div> </div>
</Link> </Link>
) );
} };
export default RoomSingle export default RoomSingle;
...@@ -20,7 +20,7 @@ const Info = () => { ...@@ -20,7 +20,7 @@ const Info = () => {
} }
useEffect(() => { useEffect(() => {
getProfile(userprofile); getProfile(userprofile);
}, [userprofile]); }, []);
return ( return (
......
...@@ -100,6 +100,7 @@ const InfoUpdate = () => { ...@@ -100,6 +100,7 @@ const InfoUpdate = () => {
> >
<img <img
src={`/uploads/${profile.img}`} src={`/uploads/${profile.img}`}
alt="profileImg"
id="imgfile" id="imgfile"
className="rounded-circle mt-2" className="rounded-circle mt-2"
style={{ height: "320px", width: "320px" }} style={{ height: "320px", width: "320px" }}
...@@ -111,6 +112,7 @@ const InfoUpdate = () => { ...@@ -111,6 +112,7 @@ const InfoUpdate = () => {
<label htmlFor="inputfile"> <label htmlFor="inputfile">
<img <img
className="rounded-circle" className="rounded-circle"
alt="newProfileImg"
src="/infoimg.jpg" src="/infoimg.jpg"
style={{ style={{
width: "50px", width: "50px",
......
...@@ -2,27 +2,23 @@ import { Link, useParams } from "react-router-dom"; ...@@ -2,27 +2,23 @@ import { Link, useParams } from "react-router-dom";
import { useState, useEffect } from "react"; 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");
const INIT_PROFILE = { const INIT_PROFILE = {
img:"", img: "",
}; };
const Profile = () => { const Profile = () => {
const [profile, setProfile] = useState(INIT_PROFILE); const [profile, setProfile] = useState(INIT_PROFILE);
async function getProfile(userID) { async function getProfile(userID) {
try { try {
const data = await userApi.getUser(userID); const data = await userApi.getUser(userID);
setProfile(data.img) setProfile(data.img);
} catch (error) {} } catch (error) {}
} }
useEffect(() => { useEffect(() => {
getProfile(userprofile); getProfile(userprofile);
}, [userprofile]); }, []);
const { id } = useParams(); const { id } = useParams();
...@@ -55,6 +51,7 @@ const Profile = () => { ...@@ -55,6 +51,7 @@ const Profile = () => {
<div className="col"> <div className="col">
<div className="d-flex justify-content-center"> <div className="d-flex justify-content-center">
<img <img
alt="profileImg"
src={`/uploads/${profile}`} src={`/uploads/${profile}`}
className="rounded-circle mt-2" className="rounded-circle mt-2"
style={{ height: "320px", width: "320px" }} style={{ height: "320px", width: "320px" }}
......
...@@ -10,7 +10,7 @@ const ChannelList = () => { ...@@ -10,7 +10,7 @@ const ChannelList = () => {
<LeftHamburger /> <LeftHamburger />
<div> <div>
<Link to="/user"> <Link to="/user">
<img src="/BORA.png" style={{ width: '160px' }} /> <img src="/BORA.png" alt="logo" style={{ width: '160px' }} />
</Link> </Link>
</div> </div>
<RightHamburger /> <RightHamburger />
......
import ScreenSelect from './ScreenSelect' import ScreenSelect from "./ScreenSelect";
import video_btn from '../../images/videobtn.png' import video_btn from "../../images/videobtn.png";
import speaker_btn from '../../images/speakerbtn.png' import speaker_btn from "../../images/speakerbtn.png";
import mic_btn from '../../images/micbtn.png' import mic_btn from "../../images/micbtn.png";
import videooff_btn from '../../images/videooffbtn.png' import videooff_btn from "../../images/videooffbtn.png";
import speakeroff_btn from '../../images/speakeroffbtn.png' import speakeroff_btn from "../../images/speakeroffbtn.png";
import micoff_btn from '../../images/micoffbtn.png' import micoff_btn from "../../images/micoffbtn.png";
import React, { useState } from 'react'; import React, { useState } from "react";
const Controller = () => {
const [mic, setMic] = useState("true")
const [speaker, setSpeaker] = useState("true")
const [video, setVideo] = useState("true")
const micOn = (() => setMic(false));
const micOff = (() => setMic(true));
const speakerOn = (() => setSpeaker(false));
const speakerOff = (() => setSpeaker(true));
const videoOn = (() => setVideo(false));
const videoOff = (() => setVideo(true));
const Controller = (props) => {
const { mic, video, speaker, setMic, setSpeaker, setVideo } = props;
return ( return (
<div className="container"> <div className="container">
<div className="row"> <div className="row">
<div <div
className="col d-flex justify-content-center" className="col d-flex justify-content-center"
style={{ backgroundColor: '#C4C4C4', position: 'absolute', bottom: 0, width: '414px' }} style={{
backgroundColor: "#C4C4C4",
position: "absolute",
bottom: 0,
width: "414px",
}}
> >
{mic ? (
{mic ? <div className="col d-flex justify-content-center"> <div className="col d-flex justify-content-center">
<button type="button" className="btn" onClick={micOn}> <button type="button" className="btn" onClick={setMic}>
<img src={micoff_btn} width="45" height="40" /> <img src={micoff_btn} width="45" height="40" />
</button> </button>
</div> </div>
: <div className="col d-flex justify-content-center"> ) : (
<button type="button" className="btn" onClick={micOff}> <div className="col d-flex justify-content-center">
<button type="button" className="btn" onClick={setMic}>
<img src={mic_btn} width="45" height="40" /> <img src={mic_btn} width="45" height="40" />
</button> </button>
</div> </div>
} )}
{speaker ? <div className="col d-flex justify-content-center"> {speaker ? (
<button type="button" className="btn" onClick={speakerOn}> <div className="col d-flex justify-content-center">
<button type="button" className="btn" onClick={setSpeaker}>
<img src={speakeroff_btn} width="45" /> <img src={speakeroff_btn} width="45" />
</button> </button>
</div> : <div className="col d-flex justify-content-center"> </div>
<button type="button" className="btn" onClick={speakerOff}> ) : (
<div className="col d-flex justify-content-center">
<button type="button" className="btn" onClick={setSpeaker}>
<img src={speaker_btn} width="45" /> <img src={speaker_btn} width="45" />
</button> </button>
</div> </div>
} )}
{video ? <div className="col d-flex justify-content-center"> {video ? (
<div className="col d-flex justify-content-center">
<button <button
type="button" type="button"
className="btn" className="btn"
data-bs-toggle="modal" data-bs-toggle="modal"
data-bs-target="#shareModal" data-bs-target="#shareModal"
onClick="location.href='ScreenSelect.js'" onClick={setVideo}
onClick={videoOn}
> >
<img src={videooff_btn} width="45" /> <img src={videooff_btn} width="45" />
</button> </button>
</div> : </div>
) : (
<div className="col d-flex justify-content-center"> <div className="col d-flex justify-content-center">
<button type="button" className="btn" onClick={videoOff}> <button type="button" className="btn" onClick={setVideo}>
<img src={video_btn} width="45" /> <img src={video_btn} width="45" />
</button> </button>
</div>}
</div> </div>
<ScreenSelect videoOff={videoOff} /> )}
</div>
{/* <ScreenSelect videoOff={setVideo} /> */}
</div> </div>
</div> </div>
) );
} };
export default Controller export default Controller;
import { Link } from 'react-router-dom' import { Link } from "react-router-dom";
const RoomHeader = () => { const RoomHeader = () => {
return ( return (
<div <div
className="d-flex justify-content-between align-items-center p-2" className="d-flex justify-content-between align-items-center p-2"
style={{ backgroundColor: '#C4C4C4', height: '60px' }} style={{ backgroundColor: "#C4C4C4", height: "60px" }}
> >
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<img <img
alt="roomImg"
className="rounded-circle" className="rounded-circle"
src="/cherry.jpg" src="/cherry.jpg"
width="40px" width="40px"
...@@ -16,16 +17,16 @@ const RoomHeader = () => { ...@@ -16,16 +17,16 @@ const RoomHeader = () => {
<a <a
className="p-3 ms-1 text-center text-decoration-none" className="p-3 ms-1 text-center text-decoration-none"
style={{ style={{
fontWeight: 'bold', fontWeight: "bold",
fontSize: '20px', fontSize: "20px",
color: '#6c33a2', color: "#6c33a2",
}} }}
> >
# 회의 # 회의
</a> </a>
</div> </div>
</div> </div>
) );
} };
export default RoomHeader export default RoomHeader;
...@@ -4,7 +4,7 @@ import SignUp from "../components/SignUp"; ...@@ -4,7 +4,7 @@ import SignUp from "../components/SignUp";
const HomeGuestPage = () => { const HomeGuestPage = () => {
return ( return (
<div className="d-flex flex-column justify-content-center h-100 font-weight-bold"> <div className="d-flex flex-column justify-content-center h-100 font-weight-bold">
<img src="BORA.PNG" className="w-100 p-4" /> <img src="BORA.PNG" alt="logo" className="w-100 p-4" />
<div className="d-flex flex-column align-items-center"> <div className="d-flex flex-column align-items-center">
<button <button
type="button" type="button"
......
...@@ -34,7 +34,7 @@ const InvitePage = () => { ...@@ -34,7 +34,7 @@ const InvitePage = () => {
> >
{/* 방 부분 */} {/* 방 부분 */}
<p style={{ marginBottom: "0px", fontSize: "16px" }}>초대받은 </p> <p style={{ marginBottom: "0px", fontSize: "16px" }}>초대받은 </p>
<img style={{ width: "90px", height: "90px" }}></img> <img alt="roomImg" style={{ width: "90px", height: "90px" }}></img>
<p style={{ marginBottom: "0px", fontSize: "16px" }}> <p style={{ marginBottom: "0px", fontSize: "16px" }}>
id: {/*${roomid}*/} id: {/*${roomid}*/}
</p> </p>
......
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