Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
14 changes: 14 additions & 0 deletions src/components/ui/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,20 @@ function BottomSheet({
[trackingElementRef],
);

React.useEffect(() => {
if (!vaulOpen) return;
const body = document.body;
const restorePointerEvents = () => {
if (body.style.pointerEvents === 'none') {
body.style.pointerEvents = '';
}
};
restorePointerEvents();
const observer = new MutationObserver(restorePointerEvents);
observer.observe(body, { attributes: true, attributeFilter: ['style'] });
return () => observer.disconnect();
}, [vaulOpen]);
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

const isFullPage = snapPoints.length > 1 && activeSnap === lastSnap;

const collapse = React.useCallback(() => {
Expand Down
5 changes: 5 additions & 0 deletions src/features/pin/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,9 @@ export type PinSearchPlace = PlaceResult & {
* 상단 검색창 대신 ‘뒤로가기’를 표시한다.
*/
showMapBackButton?: boolean;
/**
* 이 장소에 등록된 핀이 있는지. creatorName이 없는 경로(예: 인기 장소 카드)에서도
* 마커를 신규 미등록 장소용 기본 아이콘으로 잘못 그리지 않기 위해 별도로 둔다.
*/
hasPin?: boolean;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
};
4 changes: 3 additions & 1 deletion src/hooks/useYouTubeClipPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ export function useYouTubeClipPlayer({ enabled = true }: UseYouTubeClipPlayerOpt
clearStopTimer();
activeKeyRef.current = null;
setPlayingKey(null);
playerRef.current?.pauseVideo();
if (playerReadyRef.current) {
playerRef.current?.pauseVideo();
}
}, [clearStopTimer]);

const scheduleClipStop = useCallback(
Expand Down
1 change: 1 addition & 0 deletions src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ export default function HomePage() {
address: placeDetail.roadAddress || placeDetail.address,
distance: placeDetail.distanceMeters,
creatorName: place.creatorName,
hasPin: placeDetail.hasPin,
bookmarkedByMe: placeDetail.bookmarkedByMe,
isMine: placeDetail.pinnedByMe,
selectionLocation: userLocation,
Expand Down
9 changes: 7 additions & 2 deletions src/pages/MapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,15 @@ const MapPage: React.FC<MapPageProps> = ({
// CTA(focusedFeedPin)와 말풍선(mapFocusPin)을 분리해, 찜한 노래에서는 내 등록 곡이 없어도 인기 PIN 말풍선은 유지한다.
const overlayFocusPin = selectedMapPlace?.mapFocusPin ?? selectedMapPlace?.focusedFeedPin;
const isNewUnregisteredPlace = Boolean(
selectedMapPlace && !overlayFocusPin && !selectedMapPlace.creatorName,
selectedMapPlace &&
!overlayFocusPin &&
!selectedMapPlace.creatorName &&
!selectedMapPlace.hasPin,
);
const focusedMapPinId =
selectedMapPlace && (overlayFocusPin || isNewUnregisteredPlace) ? selectedMapPlace.id : null;
selectedMapPlace && (overlayFocusPin || isNewUnregisteredPlace || selectedMapPlace.hasPin)
? selectedMapPlace.id
: null;
const displayMapPins = useMemo(() => {
let pins = mapPins;

Expand Down
Loading