diff --git a/src/app/(app)/trips/page.tsx b/src/app/(app)/trips/page.tsx index 45f2956..98e8f62 100644 --- a/src/app/(app)/trips/page.tsx +++ b/src/app/(app)/trips/page.tsx @@ -159,6 +159,7 @@ export default function TripsPage() { const { resetDraft } = useTripDraft(); const [schedules, setSchedules] = useState([]); + const [showAllSchedules, setShowAllSchedules] = useState(false); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [now, setNow] = useState(() => new Date()); @@ -202,6 +203,8 @@ export default function TripsPage() { const upcoming = sorted.find((s) => diffDays(today, parseDate(s.endDate)) >= 0); return upcoming ?? sorted[sorted.length - 1]; }, [sorted, today]); + const visibleSchedules = showAllSchedules ? sorted : sorted.slice(0, 3); + const canToggleSchedules = sorted.length > 3; return (
@@ -326,16 +329,28 @@ export default function TripsPage() {

모든 일정 {sorted.length}

- - 전체 보기 - + {canToggleSchedules && ( + + )}
{sorted.length === 0 ? (

아직 만든 일정이 없어요

) : (