- {childArray}
+
{childArray}
+ {loopChildren}
);
}
diff --git a/src/features/feed/ui/MapFeedCardPager.tsx b/src/features/feed/ui/MapFeedCardPager.tsx
index 088d64d..5eda348 100644
--- a/src/features/feed/ui/MapFeedCardPager.tsx
+++ b/src/features/feed/ui/MapFeedCardPager.tsx
@@ -455,12 +455,25 @@ export function MapFeedCardPager({
onPointerDown={(e) =>
e.stopPropagation()
}
- aria-label="찜에 추가"
- className="absolute right-3 top-3 z-10 flex h-9 w-9 items-center justify-center rounded-full border border-border-soft/70 bg-card/90 text-foreground shadow-sm backdrop-blur-md transition-colors hover:bg-destructive hover:text-destructive-foreground"
+ aria-label={
+ item.isBookmarked
+ ? '찜 해제'
+ : '찜에 추가'
+ }
+ className={
+ item.isBookmarked
+ ? 'absolute right-3 top-3 z-10 flex h-9 w-9 items-center justify-center rounded-full border border-red-200 bg-red-50 text-red-500 shadow-sm backdrop-blur-md transition-colors hover:bg-red-100'
+ : 'absolute right-3 top-3 z-10 flex h-9 w-9 items-center justify-center rounded-full border border-border-soft/70 bg-card/90 text-foreground shadow-sm backdrop-blur-md transition-colors hover:bg-destructive hover:text-destructive-foreground'
+ }
>
>
diff --git a/src/features/feed/ui/detail/FeedParticipationActions.test.tsx b/src/features/feed/ui/detail/FeedParticipationActions.test.tsx
index ccbe729..224994f 100644
--- a/src/features/feed/ui/detail/FeedParticipationActions.test.tsx
+++ b/src/features/feed/ui/detail/FeedParticipationActions.test.tsx
@@ -362,7 +362,7 @@ describe('FeedParticipationActions', () => {
);
});
expect(mockShowMessage).toHaveBeenCalledWith(
- '신청자를 수락했어요.',
+ '파트너 신청을 수락했어요.',
'',
);
expect(mockRefresh).toHaveBeenCalled();
diff --git a/src/features/feed/ui/detail/FeedParticipationActions.tsx b/src/features/feed/ui/detail/FeedParticipationActions.tsx
index 77a27da..898ee1b 100644
--- a/src/features/feed/ui/detail/FeedParticipationActions.tsx
+++ b/src/features/feed/ui/detail/FeedParticipationActions.tsx
@@ -35,6 +35,8 @@ import {
useRejectFeedApplication,
} from '../../model/use-feed';
import { useAuthStore } from '@/shared/model/auth-store';
+import { getErrorMessage } from '@/features/my/ui/my-page/my-page-client-utils';
+import { savePostFormPrefillContext } from '@/features/post/model/use-post-form-prefill';
function formatCurrency(value: number, maximumFractionDigits = 0) {
return `${value.toLocaleString('ko-KR', {
@@ -366,16 +368,17 @@ export function FeedParticipationActions({
);
const handleApplicationDecision = async (
- applicationId: string,
+ application: FeedApplication,
decision: 'accept' | 'reject',
) => {
- setProcessingApplicationId(applicationId);
+ setProcessingApplicationId(application.id);
+ const roleLabel = getRoleLabel(application.appliedRole);
try {
if (decision === 'accept') {
const response = await acceptFeedApplication.mutateAsync({
feedId: item.id,
- applicationId,
+ applicationId: application.id,
});
const convertedSpotId = response.data.spotId ?? item.spotId;
@@ -398,16 +401,27 @@ export function FeedParticipationActions({
item.remainingAmount > 0
? ` 앞으로 ${item.remainingAmount.toLocaleString('ko-KR')}P 더 필요해요.`
: '';
- showBottomNavMessage(`신청자를 수락했어요.${remainCopy}`, '');
+ showBottomNavMessage(
+ `${roleLabel} 신청을 수락했어요.${remainCopy}`,
+ '',
+ );
} else {
await rejectFeedApplication.mutateAsync({
feedId: item.id,
- applicationId,
+ applicationId: application.id,
});
- showBottomNavMessage('신청자를 거절했어요.', '');
+ showBottomNavMessage(`${roleLabel} 신청을 거절했어요.`, '');
+ toast.success(`${roleLabel} 신청을 거절했어요.`);
}
router.refresh();
+ } catch (error) {
+ toast.error(
+ getErrorMessage(
+ error,
+ `${roleLabel} 신청을 ${decision === 'accept' ? '수락' : '거절'}하지 못했어요.`,
+ ),
+ );
} finally {
setProcessingApplicationId(null);
}
@@ -422,10 +436,6 @@ export function FeedParticipationActions({
내 피드 신청 관리
-
- authorProfile.id 기준으로 내 피드라서 참여 버튼
- 대신 승인 플로우를 보여줘요.
-