Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/schedule/(components)/current.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const MOCK_MEETINGS: Meeting[] = [
{
id: 1,
title: '네즈코와 무한성에서 정모 하실 분',
images: [],
images: [
'https://images.unsplash.com/photo-1518020382113-a7e8fc38eac9?q=80&w=717&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
],
location: '네즈코 호수공원',
dateTime: '25. 11. 28 - 10:00',
nickName: 'Hope Lee',
Expand Down
6 changes: 3 additions & 3 deletions src/app/schedule/(components)/empty-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Button } from '@/components/ui';
import { cn } from '@/lib/utils';

type EmptyStateProps = {
type: 'current' | 'my' | 'history';
type: 'current' | 'myPost' | 'past';
onButtonClick: () => void;
};

Expand All @@ -15,12 +15,12 @@ const EMPTY_STATE_CONFIG = {
buttonText: '모임 보러가기',
buttonWidth: 'w-[124px]',
},
my: {
myPost: {
text: '아직 생성한 모임이 없어요.\n지금 바로 모임을 만들어보세요!',
buttonText: '모임 만들기',
buttonWidth: 'w-[112px]',
},
history: {
past: {
text: '아직 참여한 모임이 없어요.\n마음에 드는 모임을 발견해보세요!',
buttonText: '모임 보러가기',
buttonWidth: 'w-[124px]',
Expand Down
4 changes: 2 additions & 2 deletions src/app/schedule/(components)/history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export default function History() {
return (
<MeetingList
emptyStatePath='/'
emptyStateType='history'
emptyStateType='past'
meetings={MOCK_MEETINGS}
showActions={false}
tabType='history'
tabType='past'
/>
);
}
8 changes: 5 additions & 3 deletions src/app/schedule/(components)/my.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const MOCK_MEETINGS: Meeting[] = [
{
id: 2,
title: '주말 러닝 크루 모집',
images: [],
images: [
'https://images.unsplash.com/photo-1518020382113-a7e8fc38eac9?q=80&w=717&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
],
location: '한강공원 잠실지구',
dateTime: '25. 12. 05 - 07:30',
nickName: 'Minseo Kim',
Expand All @@ -21,11 +23,11 @@ export default function My() {
return (
<MeetingList
emptyStatePath='/post-meetup'
emptyStateType='my'
emptyStateType='myPost'
leaveActionText='모임 취소'
meetings={MOCK_MEETINGS}
showActions={true}
tabType='my'
tabType='myPost'
/>
);
}
2 changes: 1 addition & 1 deletion src/app/schedule/(components)/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export type Meeting = {
tags: string[];
};

export type TabType = 'current' | 'my' | 'history';
export type TabType = 'current' | 'myPost' | 'past';
8 changes: 4 additions & 4 deletions src/app/schedule/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import My from './(components)/my';

const SCHEDULE_TABS = [
{ label: '현재 모임', value: 'current' },
{ label: '나의 모임', value: 'my' },
{ label: '모임 이력', value: 'history' },
{ label: '나의 모임', value: 'myPost' },
{ label: '모임 이력', value: 'past' },
];

const ScheduleContent = () => {
Expand All @@ -23,8 +23,8 @@ const ScheduleContent = () => {
return (
<>
{tab === 'current' && <Current />}
{tab === 'my' && <My />}
{tab === 'history' && <History />}
{tab === 'myPost' && <My />}
{tab === 'past' && <History />}
</>
);
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/shared/card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type CardProps = {
onLeave: () => void;
onChat: () => void;
};
tabType?: 'current' | 'my' | 'history';
tabType?: 'current' | 'myPost' | 'past';
};

const calculateProgress = (count: number, max: number): number => {
Expand Down Expand Up @@ -59,8 +59,8 @@ const Card = ({
const hasThumbnail = !!thumbnail && !imageError;
const cardTags = convertToCardTags(tags);
const progress = calculateProgress(participantCount, maxParticipants);
const shouldShowButtons = leaveAndChatActions && tabType !== 'history';
const leaveButtonText = tabType === 'my' ? '모임 취소' : '모임 탈퇴';
const shouldShowButtons = leaveAndChatActions && tabType !== 'past';
const leaveButtonText = tabType === 'myPost' ? '모임 취소' : '모임 탈퇴';

return (
<div
Expand Down