Skip to content

Commit

Permalink
Fix plan (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
jihostudy authored Oct 13, 2024
2 parents b207530 + 510d3fe commit a5d71fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/community/plan/PlanCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ const PlanCard = ({ plan }: PlanCardProps): ReactNode => {
onClick={openPlanHandler}
>
<Image
src={PLACE_DEFAULT_IMAGE || BusanImg}
src={plan.imgSrc || PLACE_DEFAULT_IMAGE || BusanImg}
alt='BusanImg'
width={200}
height={200}
quality={100}
className='absolute h-full w-full rounded-lg p-3'
className='absolute h-full w-full rounded-lg p-3 hover:cursor-pointer'
/>
<div
className={cn(
Expand Down
9 changes: 5 additions & 4 deletions components/community/plan/PlanFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ const getPlans = async (query: Query) => {

let queryString = `?pageSize=100&userScrapOnly=false&search=&pageNum=${scrollNum}`
if (STATES.some(state => state === filterDetail)) {
queryString += `&region=${filterDetail}`
queryString += `&state=${filterDetail}`
} else if (DURATION_FILTERS.some(duration => duration === filterDetail)) {
queryString += `&duration=${filterDetail[3]}`
} else {
queryString += `&memberCount=${filterDetail.slice(0, -1)}`
queryString += `&numOfPeople=${filterDetail.slice(0, -1)}`
}

try {
Expand Down Expand Up @@ -160,10 +160,11 @@ const PlanFilter = ({}: PlanFilterProps): ReactNode => {
{data?.pages[0].totalPages === 0 && (
<div className='mt-5 text-2xl'>만들어진 계획이 없습니다. 계획을 만들고 공유하세요!</div>
)}
{/* Loading */}
</div>
{/* Loading */}
<div className='flex h-28 w-full items-center justify-center'>
{(hasNextPage || isPending) && <Loading size={40} />}
</div>
<div className='h-28 w-full'></div>
</div>
)
}
Expand Down

0 comments on commit a5d71fe

Please sign in to comment.