Skip to content

Commit

Permalink
fix: 모임 목록 아이템 중복 파일 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Heeeera committed Mar 21, 2024
1 parent 17d4d62 commit 1ec7d10
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 123 deletions.
76 changes: 0 additions & 76 deletions src/components/GatheringList/GatheringListItem.tsx

This file was deleted.

36 changes: 0 additions & 36 deletions src/components/GatheringList/index.tsx

This file was deleted.

12 changes: 3 additions & 9 deletions src/components/GatheringListItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ interface GatheringListItemProps extends ComponentPropsWithoutRef<'div'> {

const GatheringListItem = ({
gathering,
isButtonDisabled = false,
isFullDate = false,
className,
}: GatheringListItemProps) => {
const {
id: gatheringId,
id,
imageUrl,
title,
station,
Expand Down Expand Up @@ -54,18 +52,14 @@ const GatheringListItem = ({
categories.length < BOARDGAME_CATEGORIES.length
? categories.join(' · ')
: '';
const timeText = isFullDate
? getRelativeTimeWithin(createdAt, 0)
: getRelativeTimeWithin(createdAt);

return (
<Link to={`${GATHERINGS_PAGE_URL}/${gatheringId}/0`}>
<Link to={`${GATHERINGS_PAGE_URL}/${id}/0`}>
<Button
className={cn(
'h-fit gap-4 border-b border-gray-accent7 p-4',
className,
)}
disabled={isButtonDisabled}
>
<img
src={imageUrl ?? defaultThumbnailImage}
Expand All @@ -88,7 +82,7 @@ const GatheringListItem = ({
</div>
</div>
<div className='flex justify-between text-xs text-gray-accent3'>
<div>{timeText}</div>
<div>{getRelativeTimeWithin(createdAt)}</div>
<div className='flex items-center gap-1'>
<Icon id='user-line' size={12} />
<span>{headCount}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ReviewCreate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';

import { useGetEndGameDetailsApi } from '@/apis/endGameUser';
import GatheringListItem from '@/components/GatheringList/GatheringListItem';
import GatheringListItem from '@/components/GatheringListItem';
import Modal from '@/components/Modal';
import TabBar from '@/components/TabBar';
import { ROOMS_MY_END_GAMES_API_URL } from '@/constants/apiRoutes';
Expand Down
2 changes: 1 addition & 1 deletion src/stories/components/GatheringListItem.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import GatheringListItem from '@/components/GatheringListItem';

const meta: Meta<typeof GatheringListItem> = {
title: 'components/GatheringList',
title: 'components/GatheringListItem',
tags: ['autodocs'],
component: GatheringListItem,
};
Expand Down

0 comments on commit 1ec7d10

Please sign in to comment.