모집 현황
-
- {approvedApplyCount}/{capacity}명
-
+ {CAPACITY(detailData)}
@@ -342,7 +312,7 @@ const MeetingController = ({
meetingId={Number(meetingId)}
appliedInfo={appliedInfo}
isHost={isHost}
- isCoLeader={isCoLeader}
+ isCoLeader={'isCoLeader' in detailData ? detailData.isCoLeader : false}
isApplied={isApplied}
/>
)}
@@ -368,85 +338,6 @@ const SPanelWrapper = styled('div', {
},
});
-const SAbout = styled('div', {
- mr: '$90',
-
- '@tablet': {
- mr: '$0',
- },
-
- '& > div': {
- flexType: 'verticalCenter',
- mb: '$12',
- },
-
- '& > h1': {
- span: {
- color: '$gray400',
- mr: '$8',
-
- '@tablet': {
- mr: '$4',
- },
- },
-
- fontAg: '34_bold_140',
- color: '$gray10',
- mb: '$20',
-
- '@tablet': {
- fontStyle: 'H3',
- },
- },
-});
-
-const SRecruitStatus = styled('div', {
- width: 'fit-content',
- padding: '$7 $8',
- mr: '$12',
- borderRadius: '6px',
- fontAg: '16_bold_100',
-
- '@tablet': {
- padding: '$2 $6',
- mr: '$8',
- borderRadius: '5px',
- fontStyle: 'B4',
- },
-
- variants: {
- status: {
- 0: {
- backgroundColor: '$gray600',
- },
- 1: {
- backgroundColor: '$secondary',
- color: '$gray950',
- },
- 2: {
- backgroundColor: '$gray700',
- },
- },
- },
-});
-
-const SPeriod = styled('div', {
- fontAg: '20_bold_100',
- color: '$gray300',
-
- '@tablet': {
- fontStyle: 'T6',
- },
-});
-
-const SHostWrapper = styled('div', {
- position: 'relative',
- gap: '16px',
- '@mobile': {
- gap: '6px',
- },
-});
-
const Button = styled('button', {
width: '$300',
height: '$60',
diff --git a/src/components/page/home/HomeCardList/DesktopCard.tsx b/src/components/page/home/HomeCardList/DesktopCard.tsx
index e8d818fa..209be8d0 100644
--- a/src/components/page/home/HomeCardList/DesktopCard.tsx
+++ b/src/components/page/home/HomeCardList/DesktopCard.tsx
@@ -70,9 +70,7 @@ const SThumbnailImage = styled('img', {
borderRadius: '$12',
backgroundColor: '$gray800',
- backgroundSize: 'cover',
- backgroundPosition: 'center center',
- backgroundRepeat: 'no-repeat',
+ objectFit: 'cover',
});
const STitleStyle = styled('h3', {
diff --git a/src/components/page/home/HomeCardList/MobileCard.tsx b/src/components/page/home/HomeCardList/MobileCard.tsx
index f83f16ef..767d36ee 100644
--- a/src/components/page/home/HomeCardList/MobileCard.tsx
+++ b/src/components/page/home/HomeCardList/MobileCard.tsx
@@ -4,7 +4,6 @@ import UserIcon from '@assets/svg/user.svg?rect';
import { CATEGORY_NAME, CategoryType, PART_NAME } from '@constants/option';
import Link from 'next/link';
import { Flex } from '@components/util/layout/Flex';
-import { fontsObject } from '@sopt-makers/fonts';
type MobileCardProps = {
id: number;
@@ -77,9 +76,7 @@ const SThumbnailImage = styled('img', {
borderRadius: '$12',
backgroundColor: '$gray800',
- backgroundSize: 'cover',
- backgroundPosition: 'center center',
- backgroundRepeat: 'no-repeat',
+ objectFit: 'cover',
});
const STitleStyle = styled('h3', {
diff --git a/src/components/page/home/HomeCardList/index.tsx b/src/components/page/home/HomeCardList/index.tsx
index 904c02df..c1b6958f 100644
--- a/src/components/page/home/HomeCardList/index.tsx
+++ b/src/components/page/home/HomeCardList/index.tsx
@@ -2,14 +2,14 @@ import { RecommendMeetingListQueryResponse, useGetRecommendMeetingListQuery } fr
import CardList from '@components/page/home/HomeCardList/CardList';
import { styled } from 'stitches.config';
-const HomeCardList = ({ groupBrowsingCardData }: { groupBrowsingCardData: RecommendMeetingListQueryResponse }) => {
+const HomeCardList = ({ inProgressMeetingData }: { inProgressMeetingData: RecommendMeetingListQueryResponse }) => {
const { data: recommendMeetings } = useGetRecommendMeetingListQuery({ meetingIds: [359, 360, 361] });
return (
{recommendMeetings && }
-
+
{recommendMeetings && (
)}
diff --git a/src/components/page/list/Advertisement/PostDeleteModal.tsx b/src/components/page/list/Advertisement/PostDeleteModal.tsx
index 150b2982..838ab593 100644
--- a/src/components/page/list/Advertisement/PostDeleteModal.tsx
+++ b/src/components/page/list/Advertisement/PostDeleteModal.tsx
@@ -13,7 +13,7 @@ interface PostDeleteModalProps {
}
//todo: meetingId 없애기
-const PostDeleteModal = ({ isOpen, close, postId, meetingId }: PostDeleteModalProps) => {
+const PostDeleteModal = ({ isOpen, close, postId }: PostDeleteModalProps) => {
const queryClient = useQueryClient();
const { DELETE } = apiV2.get();
diff --git a/src/components/page/list/Card/DesktopSizeCard.tsx b/src/components/page/list/Card/DesktopSizeCard.tsx
deleted file mode 100644
index 39ab1918..00000000
--- a/src/components/page/list/Card/DesktopSizeCard.tsx
+++ /dev/null
@@ -1,166 +0,0 @@
-import { Flex } from '@components/util/layout/Flex';
-import { RECRUITMENT_STATUS } from '@constants/option';
-import dayjs from 'dayjs';
-import { parsePartValueToLabel } from '@api/API_LEGACY/meeting';
-import { styled } from 'stitches.config';
-import ProfileDefaultIcon from '@assets/svg/profile_default.svg?rect';
-import { getResizedImage } from '@utils/image';
-import { paths } from '@/__generated__/schema2';
-
-interface CardProps {
- meetingData: Omit<
- paths['/user/v2/meeting']['get']['responses']['200']['content']['application/json;charset=UTF-8']['meetings'][number],
- 'isCoLeader'
- > & { isCoLeader?: boolean };
- isAllParts: boolean;
-}
-
-function DesktopSizeCard({ meetingData, isAllParts }: CardProps) {
- return (
-
-
- {RECRUITMENT_STATUS[meetingData.status]}
-
-
-
-
- {meetingData.category}
- {meetingData.title}
-
-
-
-
- {meetingData.user.profileImage ? (
-
- ) : (
-
- )}
-
- {meetingData.user.name}
-
-
- 활동 기간
-
- {dayjs(meetingData.mStartDate).format('YY.MM.DD')} - {dayjs(meetingData.mEndDate).format('YY.MM.DD')}
-
-
-
- 모집 대상
-
- {meetingData.targetActiveGeneration ? `${meetingData.targetActiveGeneration}기` : '전체 기수'} /{' '}
- {isAllParts
- ? '전체 파트'
- : meetingData.joinableParts
- .map(part => parsePartValueToLabel(part))
- .filter(item => item !== null)
- .join(',')}
-
-
-
- 모집 현황
-
- {meetingData.approvedCount}/{meetingData.capacity}명
-
-
-
- );
-}
-
-export default DesktopSizeCard;
-const ImageWrapper = styled('div', {
- position: 'relative',
-});
-const SThumbnailImage = styled('div', {
- width: '380px',
- height: '260px',
- overflow: 'hidden',
- borderRadius: '$12',
- backgroundColor: '$gray800',
- backgroundSize: 'cover',
- backgroundPosition: 'center center',
- backgroundRepeat: 'no-repeat',
-});
-
-const SStatus = styled('div', {
- position: 'absolute',
- top: '16px',
- left: '16px',
- borderRadius: '$8',
- padding: '$3 $8',
- fontStyle: 'T5',
- variants: {
- recruitingStatus: {
- 0: {
- backgroundColor: '$gray600',
- },
- 1: {
- backgroundColor: '$secondary',
- color: '$gray950',
- },
- 2: {
- backgroundColor: '$gray700',
- },
- },
- },
-});
-
-const STitleSection = styled('div', {
- my: '$16',
- '@tablet': {
- my: '$8',
- },
-});
-
-const SCategory = styled('p', {
- display: 'inline-block',
- fontStyle: 'T6',
- color: '$gray200',
- border: '1px solid $gray700',
- borderRadius: '37px',
- px: '$10',
- py: '$3',
- mr: '$5',
-});
-const SProfileWrapper = styled('div', {
- flexType: 'verticalCenter',
- color: '$gray10',
- width: 'fit-content',
- mr: '$8',
-});
-const SProfile = styled('img', {
- width: '$24',
- height: '$24',
- borderRadius: '50%',
- objectFit: 'cover',
- background: '$gray700',
-});
-
-const SName = styled('p', {
- fontStyle: 'T5',
-});
-const STitle = styled('p', {
- maxWidth: '380px',
- fontStyle: 'H2',
- mt: '$8',
-});
-const SInfoRow = styled(Flex, {
- '& + &': {
- mt: '$4',
- },
-});
-const SInfo = styled('p', {
- fontStyle: 'B3',
-});
-const SKey = styled(SInfo, {
- width: '74px',
- color: '$gray500',
- mr: '$12',
- whiteSpace: 'nowrap',
-});
-const SValue = styled(SInfo, {
- color: '$gray300',
-});
diff --git a/src/components/page/list/Card/DesktopSizeCard/CategoryChip.tsx b/src/components/page/list/Card/DesktopSizeCard/CategoryChip.tsx
new file mode 100644
index 00000000..42142e75
--- /dev/null
+++ b/src/components/page/list/Card/DesktopSizeCard/CategoryChip.tsx
@@ -0,0 +1,58 @@
+import { Tag } from '@sopt-makers/ui';
+import BoltIcon from '@assets/svg/icon_bolt.svg?rect';
+import StudyIcon from '@assets/svg/icon_study.svg?rect';
+import EventIcon from '@assets/svg/icon_event.svg?rect';
+import SeminarIcon from '@assets/svg/icon_seminar.svg?rect';
+import { CategoryKoType } from '@constants/option';
+import { styled } from 'stitches.config';
+
+type CategoryChipProps = {
+ category: CategoryKoType;
+ welcomeMessage?: string[];
+};
+
+export const CategoryChip = ({ category, welcomeMessage }: CategoryChipProps) => {
+ const CategoryIcon = {
+ 번쩍: BoltIcon,
+ 스터디: StudyIcon,
+ 행사: EventIcon,
+ 세미나: SeminarIcon,
+ }[category];
+
+ return (
+
+
+
+ {category}
+
+ {category === '번쩍' && welcomeMessage?.map(message => {message})}
+
+ );
+};
+
+const TagWrapper = styled('div', {
+ display: 'flex',
+ alignItems: 'center',
+ gap: '$6',
+
+ py: '$3',
+});
+
+const WelcomeTag = styled('span', {
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+
+ padding: '$3 $10',
+
+ borderRadius: '37px',
+ border: '1px solid $gray700',
+
+ color: '$gray200',
+ fontStyle: 'T6',
+});
diff --git a/src/components/page/list/Card/DesktopSizeCard/constant.ts b/src/components/page/list/Card/DesktopSizeCard/constant.ts
new file mode 100644
index 00000000..74813c2d
--- /dev/null
+++ b/src/components/page/list/Card/DesktopSizeCard/constant.ts
@@ -0,0 +1,52 @@
+import { GetMeetingResponse, MeetingListOfFilterResponse, parsePartValueToLabel } from '@api/API_LEGACY/meeting';
+import { GetLightningByIdResponse } from '@api/lightning';
+import dayjs from 'dayjs';
+
+export const MeetingInformation = (meetingData: MeetingListOfFilterResponse['meetings'][0]) => [
+ {
+ label: '활동 기간',
+ value: () =>
+ `${dayjs(meetingData.mStartDate).format('YY.MM.DD')} - ${dayjs(meetingData.mEndDate).format('YY.MM.DD')}`,
+ },
+ {
+ label: '모집 대상',
+ value: () => {
+ const isAllParts = meetingData.joinableParts?.length === 6 || meetingData.joinableParts === null;
+ const part = isAllParts
+ ? '전체 파트'
+ : meetingData.joinableParts
+ .map(part => parsePartValueToLabel(part))
+ .filter(item => item !== null)
+ .join(',');
+ return `${
+ meetingData.targetActiveGeneration ? `${meetingData.targetActiveGeneration}기` : '전체 기수'
+ } / ${part}`;
+ },
+ },
+ {
+ label: '모집 현황',
+ value: () => `${meetingData.approvedCount}/${meetingData.capacity}명`,
+ },
+];
+
+export const LightningInformation = (lightningData: GetLightningByIdResponse) => [
+ {
+ label: '진행 일자',
+ value: () => {
+ const startDate = dayjs(lightningData.activityStartDate).format('YY.MM.dd');
+ const endDate = dayjs(lightningData.activityEndDate).format('YY.MM.dd');
+
+ if (lightningData.timingType === '당일') return startDate;
+
+ return `${startDate} - ${endDate} / 협의 후 결정`;
+ },
+ },
+ {
+ label: '활동 장소',
+ value: () => lightningData.place,
+ },
+ {
+ label: '모집 현황',
+ value: () => `${lightningData.minimumCapacity} ~ ${lightningData.maximumCapacity} / `,
+ },
+];
diff --git a/src/components/page/list/Card/DesktopSizeCard/index.tsx b/src/components/page/list/Card/DesktopSizeCard/index.tsx
new file mode 100644
index 00000000..7cf34e19
--- /dev/null
+++ b/src/components/page/list/Card/DesktopSizeCard/index.tsx
@@ -0,0 +1,121 @@
+import { Flex } from '@components/util/layout/Flex';
+import { CategoryKoType } from '@constants/option';
+import { MeetingListOfFilterResponse } from '@api/API_LEGACY/meeting';
+import { styled } from 'stitches.config';
+import ProfileDefaultIcon from '@assets/svg/profile_default.svg?rect';
+import { getResizedImage } from '@utils/image';
+import { CategoryChip } from '@components/page/list/Card/DesktopSizeCard/CategoryChip';
+import RecruitmentStatusTag from '@components/Tag/RecruitmentStatusTag';
+import { useLightningByIdQuery } from '@api/lightning/hook';
+import { LightningInformation, MeetingInformation } from '@components/page/list/Card/DesktopSizeCard/constant';
+
+interface CardProps {
+ meetingData: MeetingListOfFilterResponse['meetings'][0];
+}
+
+function DesktopSizeCard({ meetingData }: CardProps) {
+ const { data: lightningData } = useLightningByIdQuery({ meetingId: +meetingData.id });
+
+ const detailData = lightningData ? lightningData : meetingData;
+ const detailInfo = lightningData ? LightningInformation(lightningData) : MeetingInformation(meetingData);
+
+ return (
+
+
+
+
+
+
+
+
+ {meetingData.title}
+
+
+
+
+ {meetingData.user.profileImage ? (
+
+ ) : (
+
+ )}
+
+ {meetingData.user.name}
+
+ {detailInfo.map(({ label, value }) => (
+
+ {label}
+ {value()}
+
+ ))}
+
+ );
+}
+
+export default DesktopSizeCard;
+const ImageWrapper = styled('div', {
+ position: 'relative',
+});
+const SThumbnailImage = styled('div', {
+ width: '380px',
+ height: '260px',
+ overflow: 'hidden',
+ borderRadius: '$12',
+ backgroundColor: '$gray800',
+ backgroundSize: 'cover',
+ backgroundPosition: 'center center',
+ backgroundRepeat: 'no-repeat',
+});
+
+const STitleSection = styled('div', {
+ my: '$16',
+ '@tablet': {
+ my: '$8',
+ },
+});
+
+const SProfileWrapper = styled('div', {
+ flexType: 'verticalCenter',
+ color: '$gray10',
+ width: 'fit-content',
+ mr: '$8',
+});
+const SProfile = styled('img', {
+ width: '$24',
+ height: '$24',
+ borderRadius: '50%',
+ objectFit: 'cover',
+ background: '$gray700',
+});
+
+const SName = styled('p', {
+ fontStyle: 'T5',
+});
+const STitle = styled('p', {
+ maxWidth: '380px',
+ fontStyle: 'H2',
+ mt: '$8',
+});
+const SInfoRow = styled(Flex, {
+ '& + &': {
+ mt: '$4',
+ },
+});
+const SInfo = styled('p', {
+ fontStyle: 'B3',
+});
+const SKey = styled(SInfo, {
+ width: '74px',
+ color: '$gray500',
+ mr: '$12',
+ whiteSpace: 'nowrap',
+});
+const SValue = styled(SInfo, {
+ color: '$gray300',
+});
diff --git a/src/components/page/list/Card/MobileSize/CardType.tsx b/src/components/page/list/Card/MobileSize/CardType.tsx
index a769b9e9..f2403f50 100644
--- a/src/components/page/list/Card/MobileSize/CardType.tsx
+++ b/src/components/page/list/Card/MobileSize/CardType.tsx
@@ -1,6 +1,5 @@
import { RECRUITMENT_STATUS } from '@constants/option';
import { styled } from 'stitches.config';
-import { getResizedImage } from '@utils/image';
import { MobileSizeCardProps } from '.';
function CardType({ meetingData }: Pick) {
diff --git a/src/components/page/list/Card/MobileSize/ListType.tsx b/src/components/page/list/Card/MobileSize/ListType.tsx
index d39aad59..9c87c524 100644
--- a/src/components/page/list/Card/MobileSize/ListType.tsx
+++ b/src/components/page/list/Card/MobileSize/ListType.tsx
@@ -1,18 +1,18 @@
import { Flex } from '@components/util/layout/Flex';
-import { RECRUITMENT_STATUS } from '@constants/option';
import { parsePartValueToLabel } from '@api/API_LEGACY/meeting';
import { styled } from 'stitches.config';
import ProfileDefaultIcon from '@assets/svg/profile_default.svg?rect';
import { getResizedImage } from '@utils/image';
import { Divider } from '@components/util/Divider';
import { MobileSizeCardProps } from '.';
+import RecruitmentStatusTag from '@components/Tag/RecruitmentStatusTag';
function ListType({ meetingData, isAllParts }: Omit) {
return (
- {RECRUITMENT_STATUS[meetingData.status]}
+
& { isCoLeader?: boolean };
+ meetingData: MeetingListOfFilterResponse['meetings'][0];
isAllParts: boolean;
mobileType: 'list' | 'card';
}
diff --git a/src/components/page/list/Card/index.tsx b/src/components/page/list/Card/index.tsx
index f1a17012..88a116ba 100644
--- a/src/components/page/list/Card/index.tsx
+++ b/src/components/page/list/Card/index.tsx
@@ -6,14 +6,11 @@ import MobileSizeCard from './MobileSize';
import { styled } from 'stitches.config';
import { PART_OPTIONS, PART_VALUES, RECRUITMENT_STATUS } from '@constants/option';
import { ampli } from '@/ampli';
-import { paths } from '@/__generated__/schema2';
+import { MeetingListOfFilterResponse } from '@api/API_LEGACY/meeting';
interface CardProps {
bottom?: ReactNode;
- meetingData: Omit<
- paths['/user/v2/meeting']['get']['responses']['200']['content']['application/json;charset=UTF-8']['meetings'][number],
- 'isCoLeader'
- > & { isCoLeader?: boolean };
+ meetingData: MeetingListOfFilterResponse['meetings'][0];
mobileType: 'list' | 'card';
}
@@ -37,7 +34,7 @@ function Card({ bottom, meetingData, mobileType }: CardProps) {
>
-
+
diff --git a/src/components/page/mine/management/ManagementListItem.tsx b/src/components/page/mine/management/ManagementListItem.tsx
index 35b242e2..bd8168c7 100644
--- a/src/components/page/mine/management/ManagementListItem.tsx
+++ b/src/components/page/mine/management/ManagementListItem.tsx
@@ -6,7 +6,6 @@ import DefaultModal from '@components/modal/DefaultModal';
import { useMutationUpdateApplication } from '@api/API_LEGACY/meeting/hooks';
import { APPLICATION_TYPE, EApprovalStatus, APPROVAL_STATUS_ENGLISH_TO_KOREAN } from '@constants/option';
import { playgroundLink } from '@sopt-makers/playground-common';
-import ArrowMiniIcon from '@assets/svg/arrow_mini.svg';
import ProfileDefaultIcon from '@assets/svg/profile_default.svg?rect';
import dayjs from 'dayjs';
import { AxiosError } from 'axios';
@@ -431,28 +430,6 @@ const SPhone = styled('div', {
textAlign: 'center',
});
-const SDetailButton = styled('button', {
- color: '$gray10',
- textDecoration: 'underline',
- textUnderlinePosition: 'under',
- fontAg: '18_semibold_100',
- width: '$216',
- textAlign: 'center',
-});
-
-const SCardDetailButton = styled('button', {
- display: 'flex',
- justifyContent: 'flex-start',
- mt: '$3',
- height: 'fit-content',
- fontAg: '12_medium_100',
- color: '$gray400',
-
- '& > span': {
- mr: '$2',
- },
-});
-
const SButtonContainer = styled('div', {
mr: '$8',
minWidth: 'fit-content',
diff --git a/src/constants/option.ts b/src/constants/option.ts
index 7fd93bcc..6d2b19bb 100644
--- a/src/constants/option.ts
+++ b/src/constants/option.ts
@@ -71,6 +71,7 @@ interface StringKeyObject {
}
export type CategoryType = 'STUDY' | 'EVENT' | 'SEMINAR' | '번쩍';
+export type CategoryKoType = '스터디' | '행사' | '세미나' | '번쩍';
export const CATEGORY_NAME = (category: CategoryType) => {
switch (category) {
case '번쩍':
diff --git a/src/data/options.ts b/src/data/options.ts
index f20283d5..c523d51c 100644
--- a/src/data/options.ts
+++ b/src/data/options.ts
@@ -33,18 +33,18 @@ export const parts = [
{ label: '서버', value: 'SERVER', order: 7 },
];
-export const bungaeTime = [
+export const lightningTime = [
{ label: '당일', value: '당일' },
{ label: '예정 기간 (협의 후 결정)', value: '예정 기간 (협의 후 결정)' },
];
-export const bungaePlace = [
+export const lightningPlace = [
{ label: '오프라인', value: '오프라인' },
{ label: '온라인', value: '온라인' },
{ label: '협의 후 결정', value: '협의 후 결정' },
];
-export const bungaeTags = [
+export const lightningTags = [
{ label: 'YB 환영', value: 'YB 환영' },
{ label: 'OB 환영', value: 'OB 환영' },
{ label: '초면 환영', value: '초면 환영' },
diff --git a/src/hooks/useOverlay/OverlayProvider.tsx b/src/hooks/useOverlay/OverlayProvider.tsx
index 29f40519..2a83a02f 100644
--- a/src/hooks/useOverlay/OverlayProvider.tsx
+++ b/src/hooks/useOverlay/OverlayProvider.tsx
@@ -1,4 +1,4 @@
-import React, { createContext, PropsWithChildren, ReactNode, useCallback, useEffect, useMemo, useState } from 'react';
+import React, { createContext, PropsWithChildren, ReactNode, useCallback, useMemo, useState } from 'react';
export const OverlayContext = createContext<{
mount(id: string, element: ReactNode): void;
diff --git a/src/types/form.ts b/src/types/form.ts
index b52a68cd..e5a010e6 100644
--- a/src/types/form.ts
+++ b/src/types/form.ts
@@ -87,7 +87,7 @@ export const MAX_FILE_SIZE = 20 * 1024 ** 2; // 5MB
export const ACCEPTED_IMAGE_TYPES = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp', 'image/gif'];
-export const bungaeSchema = z.object({
+export const lightningSchema = z.object({
title: z
.string()
.max(30, { message: '30자 까지 입력할 수 있습니다.' })
@@ -168,4 +168,4 @@ export const bungaeSchema = z.object({
.nullable(),
});
-export type BungaeFormType = z.infer;
+export type LightningFormType = z.infer;