Skip to content

Commit

Permalink
hotfix: 워케이션 당첨자 필터링
Browse files Browse the repository at this point in the history
  • Loading branch information
eunji0714 committed Aug 14, 2024
1 parent 29d5823 commit 5f9752e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const UserWkApplyPage = ({ params }: Props) => {
},
});

if (isLoading || myPointIsLoading || pointIsLoading) {
if (isLoading || myPointIsLoading) {
return <UserLoading />;
}
if (isError || myPointIsError || pointIsError) {
Expand Down
61 changes: 34 additions & 27 deletions src/app/_components/user/workation/WkResultInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,40 @@ const WkResultInfo = ({ id }: { id: number }) => {
<WkSlider id={id} />
<div className="flex flex-col">
<UserSubtitleAtom subtitle="추첨 결과" />
<div className="flex w-full justify-between gap-3.5 overflow-x-auto scrollbar-hide">
{data?.wktWinningUserInfos.map((winner) => (
<div
key={winner.accountId}
className={`flex h-16 w-48 min-w-48 items-center rounded-full ${winner.applyStatusType === 'CONFIRM' || 'VISITED' ? 'bg-primary' : 'bg-primary/50'}`}
>
<p className="ml-2.5 mr-4 h-12 w-12 rounded-full bg-white pt-3 text-center">
최초
</p>
<p>
{winner.department} {winner.name}
</p>
</div>
))}
{data?.wktWaitingUserInfos.map((waiter) => (
<div
key={waiter.accountId}
className={`flex h-16 w-48 min-w-48 items-center rounded-full ${waiter.applyStatusType === ('CONFIRM' || 'VISITED') ? 'bg-primary' : 'bg-primary/50'}`}
>
<p className="ml-2.5 mr-3.5 h-12 w-12 rounded-full bg-white pt-2.5 text-center">
{waiter.waitingNum}
</p>
<p>
{waiter.department} {waiter.name}
</p>
</div>
))}
<div className="flex w-full gap-3.5 overflow-x-auto scrollbar-hide">
{data?.wktWinningUserInfos.map(
(winner) =>
winner.applyStatusType === 'CANCEL' || (
<div
key={winner.accountId}
className={`flex h-16 w-[200px] min-w-[200px] items-center rounded-full ${winner.applyStatusType === 'CONFIRM' || 'VISITED' ? 'bg-primary' : 'bg-primary/50'}`}
>
<p className="ml-2.5 mr-4 h-12 w-12 rounded-full bg-white pt-3 text-center">
최초
</p>
<p>
{winner.department} {winner.name}
</p>
</div>
),
)}
<div className="h-13 w-[1px] bg-sub-100" />
{data?.wktWaitingUserInfos.map(
(waiter) =>
waiter.waitingNum < 0 || (
<div
key={waiter.accountId}
className={`flex h-16 w-[200px] min-w-[200px] items-center rounded-full ${waiter.applyStatusType === ('CONFIRM' || 'VISITED') ? 'bg-primary' : 'bg-primary/50'}`}
>
<p className="ml-2.5 mr-3.5 h-12 w-12 rounded-full bg-white pt-2.5 text-center">
{waiter.waitingNum}
</p>
<p>
{waiter.department} {waiter.name}
</p>
</div>
),
)}
</div>
<div className="mt-16 flex flex-col gap-10">
<div className="flex flex-col gap-4">
Expand Down

0 comments on commit 5f9752e

Please sign in to comment.