(null);
-
- useEffect(() => {
- const el = bottomRef.current;
- if (!el) return;
-
- const io = new IntersectionObserver(
- (entries) => {
- const first = entries[0];
- if (first.isIntersecting && hasNextPage && !isFetchingNextPage) {
- fetchNextPage();
- }
- },
- { threshold: 0.2 }
- );
-
- io.observe(el);
- return () => io.disconnect();
- }, [fetchNextPage, hasNextPage, isFetchingNextPage]);
-
- if (isLoading) return <>로딩>;
- if (isError) return <>에러>;
-
- //
- return (
-
-
- {title}
- {/* ❗ button 안에 button 금지 → 바깥은 div로 */}
-
-
-
setIsUsed(undefined)}
- >
- 전체
-
-
-
setIsUsed(true)}
- >
- 포도상점
-
-
-
-
-
- {items.length === 0 && 존재하는 공연이 없습니다.
}
-
- {items.map((item) => (
- setOpenCardId((prev) => (prev === item.id ? null : item.id))}
- onClose={() => setOpenCardId(null)}
- />
- ))}
-
-
- {/* ✅ sentinel */}
-
-
- {isFetchingNextPage && 불러오는 중...
}
-
- );
- };
+ const singleStatus = useMemo(() => tabToStatus(activeTab), [activeTab]);
return (
-
- {/* 상단 Info */}
-
+
+
공연 소식
+
- {/* 메뉴 선택 */}
+
- {/* 전체 */}
{activeTab === "전체" && (
{ALL_SECTIONS.map((sectionConfig) => (
{
onChangeFilter={(next) =>
setSectionUsedFilter((prev) => ({ ...prev, [sectionConfig.id]: next }))
}
- isLoading={section[sectionConfig.id].isFetching} // ✅ 필터 전환 시에도 로딩 보이게: isFetching 추천
+ isLoading={section[sectionConfig.id].isFetching}
isError={section[sectionConfig.id].isError}
+ isOver480={isOver480}
+ openCardId={openCardId}
+ setOpenCardId={setOpenCardId}
+ setPendingLink={setPendingLink}
+ setIsLinkModalOpen={setIsLinkModalOpen}
+ navigate={navigate}
/>
))}
)}
- {/* 지금 공연중 */}
- {activeTab === "지금 공연중" && }
- {/* 공연 예정 */}
- {activeTab === "공연 예정" && }
- {/* 지난 공연 */}
- {activeTab === "지난 공연" && }
-
+
+ {activeTab !== "전체" && (
+
+ )}
+
+
{
onClose={() => {
setIsLinkModalOpen(false);
setPendingLink(null);
- setOpenCardId(null); // 원하면 카드 오버레이도 같이 닫기
+ setOpenCardId(null);
}}
onConfirm={() => {
if (pendingLink) window.open(pendingLink, "_blank", "noopener,noreferrer");