-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from JangGusWjd/dev/mentoring-ui
[FE-DEV] 멘토링 첫 페이지, 리스트 페이지, 후기 남기기 모달 UI 구현
- Loading branch information
Showing
14 changed files
with
511 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
import { useState } from "react"; | ||
import { ReactComponent as CloseIcon } from "../../assets/icon/close.svg"; | ||
import { ReactComponent as StarIcon } from "../../assets/icon/review-star.svg"; | ||
import "../../styles/mentoring/MentorAll.scss"; | ||
|
||
const data = [ | ||
{ | ||
img: "https://watermark.lovepik.com/photo/20211202/large/lovepik-foreign-teacher-smiles-and-writes-a-blackboard-picture_501383572.jpg", | ||
name: "장현정", | ||
title: "멘토링 제목", | ||
content: | ||
"멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용", | ||
max: 5, | ||
apply_count: 4, | ||
}, | ||
{ | ||
img: "https://watermark.lovepik.com/photo/20211202/large/lovepik-foreign-teacher-smiles-and-writes-a-blackboard-picture_501383572.jpg", | ||
name: "장현정", | ||
title: "멘토링 제목", | ||
content: | ||
"멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용", | ||
max: 5, | ||
apply_count: 4, | ||
}, | ||
{ | ||
img: "https://watermark.lovepik.com/photo/20211202/large/lovepik-foreign-teacher-smiles-and-writes-a-blackboard-picture_501383572.jpg", | ||
name: "장현정", | ||
title: "멘토링 제목", | ||
content: | ||
"멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용", | ||
max: 5, | ||
apply_count: 4, | ||
}, | ||
{ | ||
img: "https://watermark.lovepik.com/photo/20211202/large/lovepik-foreign-teacher-smiles-and-writes-a-blackboard-picture_501383572.jpg", | ||
name: "장현정", | ||
title: "멘토링 제목", | ||
content: | ||
"멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용 멘토링 내용", | ||
max: 5, | ||
apply_count: 4, | ||
}, | ||
]; | ||
|
||
const MentorAll = () => { | ||
const [isModalOpen, setIsModalOpen] = useState(false); | ||
const [recommendation, setRecommendation] = useState(""); | ||
const [rating, setRating] = useState(0); | ||
|
||
const openModal = () => { | ||
setIsModalOpen(true); | ||
}; | ||
|
||
const closeModal = () => { | ||
setIsModalOpen(false); | ||
}; | ||
|
||
const handleRating = (index: number) => { | ||
setRating(index + 1); | ||
}; | ||
|
||
const handleRecommendation = (choice: string) => { | ||
setRecommendation(choice); | ||
}; | ||
|
||
return ( | ||
<div className="mentor-list-container"> | ||
<div className="mentor"> | ||
<h1>"멘토"로 참여중인 프로그램</h1> | ||
<div className="container"> | ||
{data.map((item, index) => ( | ||
<div className="mentoring-content" key={index}> | ||
<div className="img-box"> | ||
<img src={item.img} alt="user" /> | ||
</div> | ||
<div className="content-box"> | ||
<div> | ||
<h1>👩🏻🏫 {item.name}</h1> | ||
<h2>{item.title}</h2> | ||
<p>{item.content}</p> | ||
<span> | ||
신청인원 | {item.apply_count} / {item.max} 명 | ||
</span> | ||
</div> | ||
<div className="button"> | ||
<button>확정</button> | ||
</div> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
<div className="mentee"> | ||
<h1>"멘티"로 참여중인 프로그램</h1> | ||
<div className="container"> | ||
{data.map((item, index) => ( | ||
<div className="mentoring-content" key={index}> | ||
<div className="img-box"> | ||
<img src={item.img} alt="user" /> | ||
</div> | ||
<div className="content-box"> | ||
<div> | ||
<h1>👩🏻🏫 {item.name}</h1> | ||
<h2>{item.title}</h2> | ||
<p>{item.content}</p> | ||
<span> | ||
신청인원 | {item.apply_count} / {item.max} 명 | ||
</span> | ||
</div> | ||
<div className="button"> | ||
<p onClick={openModal}>후기 남기기</p> | ||
</div> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
{isModalOpen && ( | ||
<div className="modal-background"> | ||
<div className="modal-container"> | ||
<div className="top"> | ||
<h1>멘토링에 대한 후기를 작성해주세요.</h1> | ||
<CloseIcon onClick={closeModal} style={{ cursor: "pointer" }} /> | ||
</div> | ||
<form className="middle"> | ||
<h1>멘토링 제목</h1> | ||
<div className="star"> | ||
{[...Array(5)].map((_, index) => ( | ||
<div | ||
key={index} | ||
onClick={() => handleRating(index)} | ||
style={{ cursor: "pointer" }} | ||
className={index < rating ? "filled" : ""} | ||
> | ||
<StarIcon /> | ||
</div> | ||
))} | ||
</div> | ||
<label htmlFor="review">멘토에게 하고 싶은 말</label> | ||
<textarea id="review" /> | ||
<div className="recommend"> | ||
<p>다른 멘티에게 추천하나요?</p> | ||
<div> | ||
<span | ||
onClick={() => handleRecommendation("no")} | ||
className={recommendation === "no" ? "selected" : ""} | ||
> | ||
아니오 | ||
</span> | ||
<span | ||
onClick={() => handleRecommendation("yes")} | ||
className={recommendation === "yes" ? "selected" : ""} | ||
> | ||
예 | ||
</span> | ||
</div> | ||
</div> | ||
<button>후기 등록</button> | ||
</form> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default MentorAll; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import "../../styles/mentoring/MentorMain.scss"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
const MentorMain = () => { | ||
const navigate = useNavigate(); | ||
const goMentorAll = () => { | ||
navigate("/main/mentoring/all"); | ||
}; | ||
return ( | ||
<div className="mentor-main-container"> | ||
<div className="mentor-main-top"> | ||
<img src={require("../../assets/img/mentoring1.png")} alt="img" /> | ||
<h1> | ||
메이저인에서 <br /> | ||
나에게 맞는 멘토링을 찾아보세요. | ||
</h1> | ||
</div> | ||
<div className="mentor-main-middle"> | ||
<p onClick={goMentorAll} style={{ cursor: "pointer" }}> | ||
참여중인 멘토링 전체보기 <span>></span> | ||
</p> | ||
</div> | ||
<div className="mentor-main-bottom"> | ||
<div className="mento-apply"> | ||
<h1>멘토 등록</h1> | ||
<img src={require("../../assets/img/mentoring2.png")} alt="img" /> | ||
<p> | ||
자신만의 경험, 지식, 노하우를 바탕으로 도움이 필요한 멘티들을 위해 | ||
멘토가 되어주세요. | ||
</p> | ||
<button>멘토 등록하러 가기</button> | ||
</div> | ||
<div className="mentee-apply"> | ||
<h1>멘티 신청</h1> | ||
<img src={require("../../assets/img/mentoring3.png")} alt="img" /> | ||
<p> | ||
학습, 대인관계, 학교생활, 취업상담 등 도움이 필요한 분야의 멘토링을 | ||
신청하세요. | ||
</p> | ||
<button>나에게 맞는 멘토링 신청하기</button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MentorMain; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import MentorMain from "../../components/mentoring/MentorMain"; | ||
import MentorAll from "../../components/mentoring/MentorAll"; | ||
import styled from "styled-components"; | ||
import { Routes, Route } from "react-router-dom"; | ||
|
||
const MainContainer = styled.div` | ||
width: 90%; | ||
`; | ||
|
||
const MentorApp = () => { | ||
return ( | ||
<Routes> | ||
<Route | ||
path="/" | ||
element={ | ||
<MainContainer> | ||
<MentorMain /> | ||
</MainContainer> | ||
} | ||
/> | ||
<Route | ||
path="/all" | ||
element={ | ||
<MainContainer> | ||
<MentorAll /> | ||
</MainContainer> | ||
} | ||
/> | ||
</Routes> | ||
); | ||
}; | ||
|
||
export default MentorApp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.