Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions src/features/pin/hooks/useOpenPinPlaceOnMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ type OpenPinPlaceOptions = {
showMyRegisteredTrackCta?: boolean;
/** 친구 피드 장소 접근 토큰 발급 (팔로잉한 친구 핀 진입 시) */
requestFeedPlaceAccess?: boolean;
/** 지도 상단을 검색창 대신 뒤로가기로 표시 (내 PLIMAP 등) */
/** 지도 상단을 검색창 대신 뒤로가기로 표시 (핀 카드 진입 기본값: true) */
showMapBackButton?: boolean;
};

type OpenPlaceTrackOptions = {
placeTrackId: number | string;
fallbackPlaceName?: string;
/** 지도 상단을 검색창 대신 뒤로가기로 표시 (내 PLIMAP 등) */
/** 지도 상단을 검색창 대신 뒤로가기로 표시 (핀 카드 진입 기본값: true) */
showMapBackButton?: boolean;
};

Expand Down Expand Up @@ -129,7 +129,7 @@ export function useOpenPinPlaceOnMap({
isMine = false,
showMyRegisteredTrackCta = false,
requestFeedPlaceAccess = false,
showMapBackButton = false,
showMapBackButton = true,
}: OpenPinPlaceOptions) => {
if (isNavigating) return;

Expand Down Expand Up @@ -231,7 +231,7 @@ export function useOpenPinPlaceOnMap({
async ({
placeTrackId,
fallbackPlaceName = '',
showMapBackButton = false,
showMapBackButton = true,
}: OpenPlaceTrackOptions): Promise<OpenPlaceTrackResult> => {
if (isNavigating) {
return { ok: false, message: '이미 지도를 여는 중이에요. 잠시만 기다려 주세요.' };
Expand Down
2 changes: 1 addition & 1 deletion src/features/pin/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export type PinSearchPlace = PlaceResult & {
/** 선택 당시 입력창에 있던 검색어. 지도 검색 화면 재진입 시 그대로 복원한다. */
searchQuery?: string;
/**
* 찜한 노래/내 모든 핀 등에서 지도로 진입했을 때
* 핀 카드/알림 등에서 지도로 진입했을 때
* 상단 검색창 대신 ‘뒤로가기’를 표시한다.
*/
showMapBackButton?: boolean;
Expand Down
11 changes: 10 additions & 1 deletion src/pages/MyNotificationsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
useInfiniteNotifications,
useNotificationSubscription,
} from '@/features/notification/queries/useNotifications';
import { useOpenPinPlaceOnMap } from '@/features/pin/hooks/useOpenPinPlaceOnMap';
import { useToggleFollow } from '@/features/profile/queries/useToggleFollow';
import { useToast } from '@/hooks/useToast';

Expand All @@ -19,6 +20,7 @@ const FOLLOW_BACK_FAILED_MESSAGE = '맞팔로우하지 못했어요. 다시 시
export default function MyNotificationsPage() {
const navigate = useNavigate();
const toast = useToast();
const { openPinPlaceOnMap } = useOpenPinPlaceOnMap();
const loadMoreRef = useRef<HTMLDivElement>(null);
const [pendingMemberIds, setPendingMemberIds] = useState<Set<number>>(new Set());
const {
Expand Down Expand Up @@ -120,7 +122,14 @@ export default function MyNotificationsPage() {
isFollowPending={pendingMemberIds.has(notification.actorId)}
onFollowBack={(actorId) => void handleFollowBack(actorId)}
onOpenProfile={(actorId) => navigate(`/app/users/${actorId}`)}
onOpenPin={(pinId) => navigate(`/app/pins/${pinId}`)}
onOpenPin={(pinId) => {
void openPinPlaceOnMap({
pinId,
isMine: notification.type === 'PIN_LIKED',
showMyRegisteredTrackCta: true,
requestFeedPlaceAccess: notification.type === 'PIN_CREATED',
});
}}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
/>
))}

Expand Down
Loading