-
{data.description}
+
+
+
+ {data.occupationClassifications.map((item, index) => {
+ return (
+
+ {occupationOptions[item]}
+
+ );
+ })}
+
+
+
-
-
-
- UI/UX 디자이너{data.category1}
- 프론트엔드{data.category2}
- 프론트엔드{data.category2}
- 프론트엔드{data.category2}
- 프론트엔드{data.category2}
- 프론트엔드{data.category2}
-
-
-
);
};
diff --git a/src/components/CardGrid/memberCardGrid.js b/src/components/CardGrid/memberCardGrid.js
index 6b51c05..306a52f 100644
--- a/src/components/CardGrid/memberCardGrid.js
+++ b/src/components/CardGrid/memberCardGrid.js
@@ -1,12 +1,11 @@
import MemberCard from "../Card/memberCard";
-import { GridContainer, Title } from "./styles";
+import { GridContainer } from "./styles";
const MemberCardGrid = (props) => {
return (
-
AI 팀원 추천
{props.cardDatas.map((item) => (
diff --git a/src/components/CardGrid/teamCardGrid.js b/src/components/CardGrid/teamCardGrid.js
index 63cf5ad..2baf35f 100644
--- a/src/components/CardGrid/teamCardGrid.js
+++ b/src/components/CardGrid/teamCardGrid.js
@@ -1,12 +1,11 @@
import TeamCard from "../Card/teamCard";
-import { GridContainer, Title } from "./styles";
+import { GridContainer } from "./styles";
const TeamCardGrid = (props) => {
return (
-
AI 팀 추천
{props.cardDatas.map((item) => (
diff --git a/src/components/ContestDetail/contestDetail.js b/src/components/ContestDetail/contestDetail.js
index a1e9f66..e5111c4 100644
--- a/src/components/ContestDetail/contestDetail.js
+++ b/src/components/ContestDetail/contestDetail.js
@@ -1,5 +1,5 @@
// CompetitionDetail.js
-import React from "react";
+import React, { useState } from "react";
import {
Container,
Header,
@@ -12,9 +12,18 @@ import {
Tag,
Divider,
FooterNote,
+ DescriptionWrapper,
+ MoreButton,
+ MoreButtonText,
} from "./styles";
const ContestDetail = ({ data }) => {
+ const [isExpanded, setIsExpanded] = useState(false);
+
+ const toggleDescription = () => {
+ setIsExpanded(!isExpanded);
+ };
+
return (
@@ -57,7 +66,12 @@ const ContestDetail = ({ data }) => {
- {data.description}
+
+ {data.description}
+
+
+ {isExpanded ? "접기" : "더보기"}
+
※ 주최사 홈페이지의 공모요강을 확인하시기 바랍니다.
diff --git a/src/components/ContestDetail/styles.js b/src/components/ContestDetail/styles.js
index 1232ed5..077e2bb 100644
--- a/src/components/ContestDetail/styles.js
+++ b/src/components/ContestDetail/styles.js
@@ -36,6 +36,7 @@ export const Details = styled.div`
display: flex;
flex-direction: column;
justify-content: space-between;
+ margin-left: 80px;
`;
export const DetailItem = styled.div`
@@ -85,3 +86,40 @@ export const FilterText = styled.label`
cursor: pointer;
padding: 0 10px;
`;
+
+export const DescriptionWrapper = styled.div`
+ max-height: ${(props) => (props.isExpanded ? "none" : "300px")};
+ overflow: hidden;
+ position: relative;
+ transition: max-height 0.3s ease;
+
+ &::after {
+ content: "";
+ display: ${(props) => (props.isExpanded ? "none" : "block")};
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 50%;
+ background: linear-gradient(to bottom, transparent, white);
+ }
+`;
+
+export const MoreButton = styled.button`
+ display: ${(props) => (props.isExpanded ? "none" : "visible")};
+ background: #fafafa;
+ border: none;
+ cursor: pointer;
+ padding: 16px;
+ text-align: center;
+ margin-top: 10px;
+
+ &:hover {
+ text-decoration: underline;
+ }
+`;
+
+export const MoreButtonText = styled.label`
+ font-size: 20px;
+ color: #292929;
+`;
diff --git a/src/components/MyPage/MyFavorites/styles.js b/src/components/MyPage/MyFavorites/styles.js
index b93a260..f578901 100644
--- a/src/components/MyPage/MyFavorites/styles.js
+++ b/src/components/MyPage/MyFavorites/styles.js
@@ -90,4 +90,5 @@ export const CardContainter = styled.div`
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
+ overflow: scroll;
`;
diff --git a/src/components/MyPage/MyPageSideBar/myPageSideBar.js b/src/components/MyPage/MyPageSideBar/myPageSideBar.js
index 659e935..8b3c0c6 100644
--- a/src/components/MyPage/MyPageSideBar/myPageSideBar.js
+++ b/src/components/MyPage/MyPageSideBar/myPageSideBar.js
@@ -49,9 +49,6 @@ const MyPageSideBar = ({
return (
sideButtonClick(index)}>
- {curPage === index && (
-
- )}
{item}
);
diff --git a/src/components/MyPage/MyPageSideBar/styles.js b/src/components/MyPage/MyPageSideBar/styles.js
index 01b5f9b..aabdd34 100644
--- a/src/components/MyPage/MyPageSideBar/styles.js
+++ b/src/components/MyPage/MyPageSideBar/styles.js
@@ -1,4 +1,17 @@
-import styled from "styled-components";
+import styled, { css } from "styled-components";
+
+const sharedStyles = css`
+ width: 200px;
+ height: 60px;
+ border: none;
+ border-radius: 12px;
+ font-size: 20px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+`;
export const Container = styled.div`
margin-right: 60px;
@@ -13,40 +26,21 @@ export const Container = styled.div`
`;
export const SelectPage = styled.button`
- width: 200px;
- height: 60px;
- border: none;
- border-radius: 12px;
- font-size: 20px;
+ ${sharedStyles}
+ color: #0f0f0f;
font-weight: 600;
- background-color: #ffffff;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
-
- transition: background-color 0.3s ease;
+ background-color: #f2f2f2;
&:hover {
- background-color: #e6e6e6;
+ background-color: #f2f2f2;
}
`;
export const NotSelectPage = styled.button`
- width: 200px;
- height: 60px;
- border: none;
- border-radius: 12px;
- font-size: 20px;
+ ${sharedStyles}
font-weight: 400;
color: #c9c9c9;
background-color: #ffffff;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
-
- transition: background-color 0.3s ease;
&:hover {
- background-color: #e6e6e6;
+ background-color: #f2f2f2;
}
`;
diff --git a/src/components/MyPage/MySupport/mySupport.js b/src/components/MyPage/MySupport/mySupport.js
index c005eab..b85a831 100644
--- a/src/components/MyPage/MySupport/mySupport.js
+++ b/src/components/MyPage/MySupport/mySupport.js
@@ -1,4 +1,4 @@
-import { useState, useEffect } from "react";
+import { useState, useEffect, useRef } from "react";
import {
Container,
Title,
@@ -9,11 +9,15 @@ import {
import { ReactComponent as CheckCircleOff } from "../../../assets/myPage/CheckCircleOff.svg";
import { ReactComponent as CheckCircleOn } from "../../../assets/myPage/CheckCircleOn.svg";
import MySupportCard from "../../MyPageCard/MySupportCard/mySupportCard";
-import supportTestData from "../../../api/testDummyData/supportTestData";
+import { applicationAPI } from "../../../api/applicationAPI";
import { ReactComponent as Line } from "../../../assets/myPage/myInfoVector1.svg";
const MySupport = ({ innerRef }) => {
+ const [applications, setApplications] = useState([]);
+ const [filteredApplications, setFilteredApplications] = useState([]);
const [isCompleted, setIsCompleted] = useState(false);
+ const [page, setPage] = useState(1);
+
const [visible, setVisible] = useState({
step0: false,
step1: false,
@@ -58,9 +62,29 @@ const MySupport = ({ innerRef }) => {
EndAnimation,
};
+ const fetchApplications = async (page, state) => {
+ try {
+ const response = await applicationAPI.getMyApplications(page, state);
+ console.log(response.data.data);
+ setApplications(response.data.data.content);
+ setFilteredApplications(response.data.data.content);
+ } catch (err) {
+ console.log(err);
+ }
+ };
+
useEffect(() => {
StartAnimation();
- }, []);
+ fetchApplications(0, "all");
+ }, [page]);
+
+ useEffect(() => {
+ if (isCompleted) {
+ setFilteredApplications(applications.filter((app) => !app.isCompleted));
+ } else {
+ setFilteredApplications(applications);
+ }
+ }, [isCompleted, applications]);
return (
@@ -84,7 +108,7 @@ const MySupport = ({ innerRef }) => {
- {supportTestData.map((item) => (
+ {filteredApplications.map((item) => (
))}
diff --git a/src/components/MyPage/MyTeam/myTeam.js b/src/components/MyPage/MyTeam/myTeam.js
index fad23b5..ad0f436 100644
--- a/src/components/MyPage/MyTeam/myTeam.js
+++ b/src/components/MyPage/MyTeam/myTeam.js
@@ -1,4 +1,4 @@
-import { useState, useEffect } from "react";
+import { useState, useEffect, useRef } from "react";
import {
Container,
Title,
@@ -13,11 +13,11 @@ import { ReactComponent as CheckCircleOff } from "../../../assets/myPage/CheckCi
import { ReactComponent as CheckCircleOn } from "../../../assets/myPage/CheckCircleOn.svg";
import { ReactComponent as Cross } from "../../../assets/myPage/Cross.svg";
import MyTeamCard from "../../MyPageCard/MyTeamCard/myTeamCard";
-import MyTeamTestData from "../../../api/testDummyData/myTeamTestData";
import { teamAPI } from "../../../api/teamAPI";
const MyTeam = ({ setIsCreateTeam, innerRef }) => {
const [myTeams, setMyTeams] = useState([]);
+ const [filteredTeams, setFilteredTeams] = useState([]);
const [isMyTeam, setIsMyTeam] = useState(false);
const [visible, setVisible] = useState({
@@ -28,6 +28,7 @@ const MyTeam = ({ setIsCreateTeam, innerRef }) => {
const MyTeamBtn = () => {
setIsMyTeam(!isMyTeam);
+ console.log(filteredTeams);
};
const StartAnimation = () => {
@@ -69,6 +70,7 @@ const MyTeam = ({ setIsCreateTeam, innerRef }) => {
const response = await teamAPI.getMyTeams();
console.log(response.data.data);
setMyTeams(response.data.data);
+ setFilteredTeams(response.data.data);
} catch (err) {
console.log(err);
} finally {
@@ -81,6 +83,14 @@ const MyTeam = ({ setIsCreateTeam, innerRef }) => {
getMyTeams();
}, []);
+ useEffect(() => {
+ if (isMyTeam) {
+ setFilteredTeams(myTeams.filter((team) => team.isOwner));
+ } else {
+ setFilteredTeams(myTeams);
+ }
+ }, [isMyTeam, myTeams]);
+
return (
팀관리
@@ -98,7 +108,7 @@ const MyTeam = ({ setIsCreateTeam, innerRef }) => {
>
{isMyTeam ? : }
- 나의 팀만 보기
+ 내가 팀장인 팀만 보기
@@ -109,8 +119,8 @@ const MyTeam = ({ setIsCreateTeam, innerRef }) => {
팀 생성
- {myTeams.map((item) => (
-
+ {filteredTeams.map((item) => (
+
))}
diff --git a/src/components/MyPage/MyTeam/styles.js b/src/components/MyPage/MyTeam/styles.js
index 0b1e491..a994007 100644
--- a/src/components/MyPage/MyTeam/styles.js
+++ b/src/components/MyPage/MyTeam/styles.js
@@ -78,14 +78,14 @@ export const CreateTeamButton = styled.button`
`;
export const CardContainter = styled.div`
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
margin-left: auto;
margin-right: auto;
margin-top: 30px;
margin-bottom: 50px;
width: 767px;
height: 600px;
- display: flex;
- flex-wrap: wrap;
gap: 20px;
overflow-y: auto;
`;
diff --git a/src/components/MyPage/MyTeamDetail/myTeamDetail.js b/src/components/MyPage/MyTeamDetail/myTeamDetail.js
index 4f3d4cd..0f7fd66 100644
--- a/src/components/MyPage/MyTeamDetail/myTeamDetail.js
+++ b/src/components/MyPage/MyTeamDetail/myTeamDetail.js
@@ -1,17 +1,20 @@
import React, { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import { teamAPI } from "../../../api/teamAPI";
-import Select from "react-select";
import {
Container,
Title,
Details,
+ DetailsWrapper,
InviteContainer,
InviteInput,
InviteButton,
SelectedEmail,
SelectedEmailList,
CloseButton,
+ LogoImage,
+ DetailsTitle,
+ DetailsContent,
} from "./styles";
import Navigation from "../../Navigation/navigation";
@@ -85,15 +88,22 @@ const MyTeamDetail = () => {
+
{teamDetails.name}
-
- Email: {teamDetails.email}
- FormationDate: {teamDetails.formationDate}
- id: {teamDetails.id}
- Introduction: {teamDetails.introduction}
- phoneNumber: {teamDetails.phoneNumber}
- logo: {teamDetails.logo}
-
+
+
+ Email
+ {teamDetails.email}
+ Formation Date
+ {teamDetails.formationDate}
+ ID
+ {teamDetails.id}
+ Introduction
+ {teamDetails.introduction}
+ Phone Number
+ {teamDetails.phoneNumber}
+
+
{
const [teamName, setTeamName] = useState("");
- const [teamDescription, setTeamDescription] = useState("");
+ const [teamIntroduction, setTeamIntroduction] = useState("");
+ const [teamContent, setTeamContent] = useState("");
const [domain, setDomain] = useState("");
const [location, setLocation] = useState("");
const [phoneNumber, setPhoneNumber] = useState("");
@@ -40,7 +41,8 @@ const MyTeamPage = ({ setIsCreateTeam }) => {
const registerTeam = async () => {
if (
!teamName ||
- !teamDescription ||
+ !teamIntroduction ||
+ !teamContent ||
!domain ||
!location ||
!phoneNumber ||
@@ -48,7 +50,9 @@ const MyTeamPage = ({ setIsCreateTeam }) => {
) {
setErrors({
teamName: teamName ? "" : "팀명을 입력해 주세요",
- teamDescription: teamDescription ? "" : "팀 상세 소개를 입력해 주세요",
+ teamIntroduction: teamIntroduction
+ ? ""
+ : "팀 상세 소개를 입력해 주세요",
domain: domain ? "" : "분야를 선택해 주세요",
location: location ? "" : "활동 지역을 선택해 주세요",
phoneNumber: phoneNumber ? "" : "연락처를 입력해 주세요",
@@ -57,7 +61,8 @@ const MyTeamPage = ({ setIsCreateTeam }) => {
} else {
const data = {
name: teamName,
- introduction: teamDescription,
+ introduction: teamIntroduction,
+ content: teamContent,
domain: domain,
location: location,
phoneNumber: phoneNumber,
@@ -80,21 +85,23 @@ const MyTeamPage = ({ setIsCreateTeam }) => {
return (
신규 팀 등록
-
-
-
+
+
-
프로필 설정
{
style={{ width: "200px", height: "200px" }}
/>
) : (
-
- 사진을 여기에 드래그 하거나 클릭하여 업로드하세요 1:1 비율 권장
-
+
)}
-
- 팀 상세 소개
- handleChange(e.target.value, setTeamDescription)}
- />
-
-
-
- {errors.teamDescription && (
-
{errors.teamDescription}
- )}
-
-
팀명
-
handleChange(e.target.value, setTeamName)}
- />
- {errors.teamName && (
-
{errors.teamName}
- )}
-
활동 지역
-
handleChange(e.target.value, setLocation)}
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {errors.location && (
-
{errors.location}
- )}
-
+
+ 팀명
+ 분야
+ 활동 지역
+ 연락처
+ 이메일
+
+
+
handleChange(e.target.value, setTeamName)}
+ />
+ {errors.teamName && (
+
{errors.teamName}
+ )}
-
-
분야
-
handleChange(e.target.value, setDomain)}
- >
-
-
-
-
- {errors.domain &&
{errors.domain}
}
-
-
연락처
-
handleChange(e.target.value, setPhoneNumber)}
- />
- {errors.phoneNumber && (
-
{errors.phoneNumber}
- )}
-
-
이메일
-
handleChange(e.target.value, setEmail)}
- />
- {errors.email &&
{errors.email}
}
+
handleChange(e.target.value, setDomain)}
+ >
+
+
+
+
+ {errors.domain && (
+
{errors.domain}
+ )}
+
+
handleChange(e.target.value, setLocation)}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {errors.location && (
+
{errors.location}
+ )}
+
+
handleChange(e.target.value, setPhoneNumber)}
+ />
+ {errors.phoneNumber && (
+
{errors.phoneNumber}
+ )}
+
+
handleChange(e.target.value, setEmail)}
+ />
+ {errors.email && (
+
{errors.email}
+ )}
+
+
-
- 등록하기
-
+
한줄 소개
+
handleChange(e.target.value, setTeamIntroduction)}
+ />
+
+
+
+ 상세 소개
+ handleChange(e.target.value, setTeamContent)}
+ />
+
+
+
+
+ 등록하기
+
+
);
};
diff --git a/src/components/MyPage/MyTeamPage/styled.js b/src/components/MyPage/MyTeamPage/styled.js
index 8353083..c4ce483 100644
--- a/src/components/MyPage/MyTeamPage/styled.js
+++ b/src/components/MyPage/MyTeamPage/styled.js
@@ -9,11 +9,10 @@ export const Container = styled.div`
display: flex;
flex-direction: column;
align-items: flex-start;
+ padding: 40px;
`;
export const Title = styled.label`
- margin-left: 36px;
- margin-top: 30px;
font-size: 24px;
font-weight: 700;
`;
@@ -34,7 +33,8 @@ export const Tag = styled.label`
`;
export const Input = styled.input`
- width: 332px;
+ margin-left: 50px;
+ width: 300px;
height: 36px;
border: 1.9px solid;
border-radius: 6px;
@@ -42,7 +42,8 @@ export const Input = styled.input`
`;
export const Sel = styled.select`
- width: 332px;
+ margin-left: 50px;
+ width: 300px;
height: 36px;
border: 1.9px solid;
border-radius: 6px;
@@ -50,14 +51,10 @@ export const Sel = styled.select`
`;
export const Explanation = styled.textarea`
- width: 350px;
- height: 229px;
+ width: 100%;
border: 1.9px solid;
border-radius: 6px;
border-color: #c9c9c9;
- padding-top: 15px;
- padding-left: 18px;
- padding-right: 10px;
resize: none;
`;
diff --git a/src/components/MyPageCard/MySupportCard/mySupportCard.js b/src/components/MyPageCard/MySupportCard/mySupportCard.js
index 1ead382..227d8f7 100644
--- a/src/components/MyPageCard/MySupportCard/mySupportCard.js
+++ b/src/components/MyPageCard/MySupportCard/mySupportCard.js
@@ -9,29 +9,38 @@ import {
Fail,
} from "./styles";
-import { ReactComponent as CenterLine } from "../../../assets/myPage/SupportCenterLine.svg";
-
const MySupportCard = ({ data }) => {
return (
- {data.projectName}
-
- {data.teamName} / {data.region}
-
- {data.date}
- | {data.time}
+
+
{data.projectName}
+
+
+ {data.teamName} / {data.region}
+
+ {data.state}
+ | {data.createDate}
+
+
-
-
- {data.introduction}
- {data.pass ? 합격 : 불합격}
+ >
+ {data.introduction}
+
+
![qwe](/icons/file-text.svg)
+ {data.pass ?
합격 :
불합격}
+
+
);
};
diff --git a/src/components/MyPageCard/MySupportCard/styles.js b/src/components/MyPageCard/MySupportCard/styles.js
index d7bbe1c..de24bcf 100644
--- a/src/components/MyPageCard/MySupportCard/styles.js
+++ b/src/components/MyPageCard/MySupportCard/styles.js
@@ -1,65 +1,46 @@
import styled from "styled-components";
export const Containter = styled.div`
- position: relative;
- width: 780px;
- height: 106px;
- border: 1.9px solid;
+ display: flex;
+ flex-direction: column;
+ border: 2px solid;
border-radius: 11px;
border-color: #c9c9c9;
+ padding: 20px;
`;
export const ProjectName = styled.label`
- position: absolute;
- left: 21px;
- top: 12px;
font-size: 17px;
font-weight: 700;
color: #6d758f;
`;
export const TeamAndRegion = styled.label`
- position: absolute;
- left: 126px;
- top: 17px;
font-size: 11px;
font-weight: 600;
color: #6d758f;
`;
export const DateLabel = styled.label`
- position: absolute;
- right: 56px;
- top: 17px;
font-size: 12px;
font-weight: 500;
color: #7c7c7c;
`;
export const TimeLabel = styled.label`
- position: absolute;
- right: 16px;
- top: 17px;
font-size: 12px;
font-weight: 400;
color: #9a9a9a;
`;
export const Introduction = styled.label`
- position: absolute;
- left: 21px;
- top: 53px;
font-size: 15px;
font-weight: 400;
- font-color: #6d758f;
+ color: #6d758f;
`;
export const Pass = styled.div`
- position: absolute;
- right: 18px;
- top: 54px;
- width: 64px;
- height: 34px;
+ width: 80px;
border: 2px solid;
border-radius: 8px;
border-color: #376fff;
@@ -73,11 +54,7 @@ export const Pass = styled.div`
`;
export const Fail = styled.div`
- position: absolute;
- right: 18px;
- top: 54px;
- width: 64px;
- height: 34px;
+ width: 80px;
border: 2px solid;
border-radius: 8px;
border-color: #ff3737;
diff --git a/src/components/MyPageCard/MyTeamCard/myTeamCard.js b/src/components/MyPageCard/MyTeamCard/myTeamCard.js
index f0ab3bd..0fc3548 100644
--- a/src/components/MyPageCard/MyTeamCard/myTeamCard.js
+++ b/src/components/MyPageCard/MyTeamCard/myTeamCard.js
@@ -11,6 +11,7 @@ import {
Introduction,
TeamMemberButtton,
EditButton,
+ Button,
} from "./styles";
import { ReactComponent as MemberCenterLine } from "../../../assets/myPage/MemberCenterLine.svg";
import { useNavigate } from "react-router-dom";
@@ -43,28 +44,27 @@ const MyTeamCard = ({ data }) => {
return (
- {data.name}
- [{data.name}]
- [{data.region}]
-
-
- {data.recruitment ? "모집중" : "모집완료"}
-
- | {formatFormationDate(data.formationDate)}
-
-
-
- {data.introduction}
-
+ {data.name}
+ {data.introduction}
+