Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOTFIX] QA 반영 #74

Merged
merged 14 commits into from
May 23, 2024
Merged
Binary file added src/assets/backgrounds/setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/icons/calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/icons/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions src/components/ExperienceDetailPage/ImageSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export const ImageSection = ({ description }: { description: string | undefined
const StyledContainer = styled.div`
width: 100%;
height: 100%;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
gap: 24px;
display: inline-flex;

img {
width: 100%;
}
`;
100 changes: 80 additions & 20 deletions src/components/MyPage/BrandView.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,49 @@
import { useState } from 'react';

import { styled } from 'styled-components';
import styled from 'styled-components';

import { ReactComponent as AddIcon } from '@/assets/icons/add.svg';
import { ReactComponent as ArrowRight } from '@/assets/icons/arrowRight.svg';
import { ReactComponent as CalendarIcon } from '@/assets/icons/calendar.svg';
import { ReactComponent as InfoIcon } from '@/assets/icons/info.svg';
import { ReactComponent as BrandLogoImage } from '@/assets/logos/brandLogo.svg';
import Card from '@/components/MyPage/Card';
import DateCard from '@/components/MyPage/DateCard';
import { BrandChip } from '@/components/common/Chip/BrandChip';
import { BrandCardModal } from '@/components/common/Modal/BrandCardModal';
import { userService } from '@/services/UserService';

interface DateCardProps {
title: string;
description: string;
date: string;
}

export const BrandView = () => {
const [isModalOpen, setIsModalOpen] = useState(false);
const [readyCards, setReadyCards] = useState<DateCardProps[]>([]);
const [progressCards, setProgressCards] = useState<DateCardProps[]>([]);
const [completeCards, setCompleteCards] = useState<DateCardProps[]>([]);

const openModal = () => {
setIsModalOpen(true);
};
const openModal = () => setIsModalOpen(true);
const closeModal = () => setIsModalOpen(false);

const closeModal = () => {
setIsModalOpen(false);
const addDateCard = (
title: string,
description: string,
date: string,
status: '준비' | '진행중' | '완료'
) => {
const newCard = { title, description, date };
if (status === '준비') {
setReadyCards((prev) => [...prev, newCard]);
} else if (status === '진행중') {
setProgressCards((prev) => [...prev, newCard]);
} else if (status === '완료') {
setCompleteCards((prev) => [...prev, newCard]);
}
};

return (
<StyledContainer>
<BrandHeader>
Expand All @@ -40,10 +63,18 @@ export const BrandView = () => {
</BrandHeader>
<ContentContainer>
<TopContent>
<BrandTextContainer>
<BrandText>브랜드 관리</BrandText>
</BrandTextContainer>
<BrandMenuContainer></BrandMenuContainer>
<BrandContainer>
<BrandTextContainer>
<BrandText>브랜드 관리</BrandText>
<RightIcon>
<InfoIcon />
</RightIcon>
</BrandTextContainer>
</BrandContainer>

<BrandMenuContainer>
<CalendarIcon />
</BrandMenuContainer>
</TopContent>
<CenterContent>
<RecommendContainer>
Expand All @@ -66,9 +97,17 @@ export const BrandView = () => {
<AddIcon width="42px" height="42px" />
</StyledAdd>
</CardHeader>
{Dummy3.map((item) => (
{Dummy3.map((item, index) => (
<DateCard
key={item.id}
key={index}
title={item.title}
description={item.description}
date={item.date}
/>
))}
{readyCards.map((item, index) => (
<DateCard
key={index}
title={item.title}
description={item.description}
date={item.date}
Expand All @@ -82,9 +121,17 @@ export const BrandView = () => {
<AddIcon width="42px" height="42px" />
</StyledAdd>
</CardHeader>
{Dummy4.map((item) => (
{Dummy4.map((item, index) => (
<DateCard
key={index}
title={item.title}
description={item.description}
date={item.date}
/>
))}
{progressCards.map((item, index) => (
<DateCard
key={item.id}
key={index}
title={item.title}
description={item.description}
date={item.date}
Expand All @@ -98,9 +145,17 @@ export const BrandView = () => {
<AddIcon width="42px" height="42px" />
</StyledAdd>
</CardHeader>
{Dummy5.map((item) => (
{Dummy5.map((item, index) => (
<DateCard
key={index}
title={item.title}
description={item.description}
date={item.date}
/>
))}
{completeCards.map((item, index) => (
<DateCard
key={item.id}
key={index}
title={item.title}
description={item.description}
date={item.date}
Expand All @@ -109,7 +164,7 @@ export const BrandView = () => {
</BottomContainer>
</BottomContent>
</ContentContainer>
<BrandCardModal isOpen={isModalOpen} onClose={closeModal} />
<BrandCardModal isOpen={isModalOpen} onClose={closeModal} onAdd={addDateCard} />
</StyledContainer>
);
};
Expand Down Expand Up @@ -203,16 +258,21 @@ const BrandTextContainer = styled.div`
gap: 12px;
display: flex;
`;
const BrandContainer = styled.div`
width: 100%;
height: 100%;
justify-content: flex-start;
align-items: center;
gap: 12px;
display: flex;
`;
const BrandText = styled.div`
text-align: center;
color: ${({ theme }) => `${theme.color.gray800}`};
${({ theme }) => theme.font.desktop.title2};
word-wrap: break-word;
`;
const BrandMenuContainer = styled.div`
border-radius: 8px;
overflow: hidden;
border: 2px #efefef solid;
justify-content: flex-start;
align-items: center;
display: flex;
Expand Down
8 changes: 4 additions & 4 deletions src/components/MyPage/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styled from 'styled-components';

const Container = styled.div`
width: 300px;
height: auto;
width: 100%;
height: 100%;
padding: 20px;
background: ${({ theme }) => `${theme.color.white}`};
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.13);
Expand All @@ -16,7 +16,7 @@ const Container = styled.div`

const InnerContainer = styled.div`
align-self: stretch;
height: 72px;
height: 100px;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
Expand All @@ -33,13 +33,13 @@ const Title = styled.div`

const Description = styled.div`
align-self: stretch;
flex: 1;
color: ${({ theme }) => `${theme.color.gray500}`};
${({ theme }) => theme.font.desktop.label2};
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
white-space: pre-wrap;
max-height: 100px;
`;

const Card = ({ title, description }: { title: string; description: string }) => {
Expand Down
5 changes: 2 additions & 3 deletions src/components/MyPage/DateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'styled-components';

const Container = styled.div`
width: 100%;
height: auto;
height: 100%;
padding: 20px;
background: ${({ theme }) => `${theme.color.white}`};
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.13);
Expand All @@ -16,7 +16,7 @@ const Container = styled.div`

const InnerContainer = styled.div`
align-self: stretch;
height: 72px;
height: 100px;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
Expand All @@ -39,7 +39,6 @@ const Description = styled.div`
overflow: hidden;
text-overflow: ellipsis;
white-space: pre-wrap;
max-height: 100px;
`;

const DateText = styled.div`
Expand Down
14 changes: 7 additions & 7 deletions src/components/MyPage/MyBrandingView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { authClient } from '@/apis/client';
import { ExperienceCard } from '@/components/MyPage/ExperienceCard';

interface ApiResponseItem {
selfUnderstandingUrl: string;
name: string;
link: string;
imageUrl: string;
programsTitle: string;
type: string;
programsId: number;
}

Expand Down Expand Up @@ -51,10 +51,10 @@ export const MyBrandingView = ({ programData, sortOrder }: MyExperienceProps) =>
{data.map((item) => (
<ExperienceCard
key={item.programsId}
imageUrl={item.selfUnderstandingUrl}
title={item.link ? '셀피스 프로그램' : '외부 프로그램'}
subtitle={item.name}
$variant={item.link ? 'type1' : 'type2'}
imageUrl={item.imageUrl}
title={item.programsTitle ? '신청 완료' : '외부 프로그램'}
$variant={item.programsTitle ? 'type1' : 'type2'}
subtitle={item.programsTitle}
/>
))}
</Container>
Expand Down
14 changes: 7 additions & 7 deletions src/components/MyPage/MyExperienceWholeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { authClient } from '@/apis/client';
import { ExperienceCard } from '@/components/MyPage/ExperienceCard';

interface ApiResponseItem {
selfUnderstandingUrl: string;
name: string;
link: string;
imageUrl: string;
programsTitle: string;
type: string;
programsId: number;
}

Expand Down Expand Up @@ -51,10 +51,10 @@ export const MyExperienceWholeView = ({ programData, sortOrder }: MyExperiencePr
{data.map((item) => (
<ExperienceCard
key={item.programsId}
imageUrl={item.selfUnderstandingUrl}
title={item.link ? '셀피스 프로그램' : '외부 프로그램'}
subtitle={item.name}
$variant={item.link ? 'type1' : 'type2'}
imageUrl={item.imageUrl}
title={item.programsTitle ? '신청 완료' : '외부 프로그램'}
$variant={item.programsTitle ? 'type1' : 'type2'}
subtitle={item.programsTitle}
/>
))}
</Container>
Expand Down
14 changes: 7 additions & 7 deletions src/components/MyPage/MyUnderstandingView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { authClient } from '@/apis/client';
import { ExperienceCard } from '@/components/MyPage/ExperienceCard';

interface ApiResponseItem {
selfUnderstandingUrl: string;
name: string;
link: string;
imageUrl: string;
programsTitle: string;
type: string;
programsId: number;
}

Expand Down Expand Up @@ -51,10 +51,10 @@ export const MyUnderstandingView = ({ programData, sortOrder }: MyExperienceProp
{data.map((item) => (
<ExperienceCard
key={item.programsId}
imageUrl={item.selfUnderstandingUrl}
title={item.link ? '셀피스 프로그램' : '외부 프로그램'}
subtitle={item.name}
$variant={item.link ? 'type1' : 'type2'}
imageUrl={item.imageUrl}
title={item.programsTitle ? '신청 완료' : '외부 프로그램'}
$variant={item.programsTitle ? 'type1' : 'type2'}
subtitle={item.programsTitle}
/>
))}
</Container>
Expand Down
17 changes: 15 additions & 2 deletions src/components/MyPage/SettingView.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
import { styled } from 'styled-components';

import backgroundImg from '@/assets/backgrounds/setting.png';
export const SettingView = () => {
return <StyledContainer>설정어쩌구</StyledContainer>;
return (
<StyledContainer>
<ImageContainer />
</StyledContainer>
);
};

const StyledContainer = styled.div`
width: 100%;
height: 100%;
padding: 100px 24px 52px 24px;
background-color: aliceblue;
`;

const ImageContainer = styled.div`
width: 100%;
height: 100%;
background-image: url(${backgroundImg});
background-size: contain;
background-position: top;
background-repeat: no-repeat;
`;
Loading
Loading