Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
36 changes: 18 additions & 18 deletions src/features/home/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,8 @@ function HomeScreen() {
<HomeNoticeBanner onSelect={openBanner} />
</Suspense>
{/* 배너 카드(relative)가 뒤 섹션보다 나중에 그려져 그림자가 덮지 않게 뒤 섹션도 relative로 둔다 */}
{/* 대여 중인 물품 → 신청 안내(신청마감 D-nn) → 신청한 행사 순으로, 내 대여·신청 현황을 먼저 보여 준다 */}
{/* Figma: 홈 주간 캘린더 추가ver (nodeId 5556:34771) — 신청 안내(신청마감 D-nn) → 학사 일정 → 대여 중인 물품 → 신청한 행사 순 */}
<div className="relative flex flex-col gap-2">
<div className="px-5">
{/* 대여 현황은 반납 대기·확인을 나눠 보여 주려고 홈 조회가 아니라 빌릴게 반납 조회·대여 내역 조회로 받는다 */}
<Suspense fallback={<HomeRentalSkeleton />}>
<HomeRentalSection
onBrowse={() => navigate(BILLILGE_TAB_PATHS.rent)}
onMore={() => navigate(BILLILGE_TAB_PATHS.return)}
onReturnRequest={openReturnRequest}
/>
</Suspense>
</div>
<Suspense fallback={null}>
<HomeApplyCardList
onApply={(section) =>
Expand All @@ -201,6 +191,23 @@ function HomeScreen() {
onSelect={openApplySection}
/>
</Suspense>
{/* 학사 일정은 홈 조회가 아니라 학사 일정 조회로 받아서, 카드가 자기 안에서 일정 영역만 Suspense로 감싼다 */}
<div className="px-5">
<HomeCalendarSection
onMore={(date) => push(getCalendarsPath(date))}
onOpen={() => push(CALENDARS_PATH)}
/>
</div>
<div className="px-5">
{/* 대여 현황은 반납 대기·확인을 나눠 보여 주려고 홈 조회가 아니라 빌릴게 반납 조회·대여 내역 조회로 받는다 */}
<Suspense fallback={<HomeRentalSkeleton />}>
<HomeRentalSection
onBrowse={() => navigate(BILLILGE_TAB_PATHS.rent)}
onMore={() => navigate(BILLILGE_TAB_PATHS.return)}
onReturnRequest={openReturnRequest}
/>
</Suspense>
</div>
<div className="px-5">
<Suspense fallback={<HomeAppliedEventSkeleton />}>
<HomeAppliedEventSection
Expand All @@ -210,13 +217,6 @@ function HomeScreen() {
/>
</Suspense>
</div>
{/* 학사 일정은 홈 조회가 아니라 학사 일정 조회로 받아서, 카드가 자기 안에서 일정 영역만 Suspense로 감싼다 */}
<div className="px-5">
<HomeCalendarSection
onMore={(date) => push(getCalendarsPath(date))}
onOpen={() => push(CALENDARS_PATH)}
/>
</div>
<div className="px-5">
<Suspense fallback={<HomeInfoListSkeleton />}>
<HomeInfoList
Expand Down
2 changes: 1 addition & 1 deletion src/features/home/components/HomeCalendarSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface HomeCalendarSectionProps {
onMore: (date: string) => void;
}

// Figma: 학사일정 · 주간 (nodeId 5365:90592), 홈 주간 캘린더 추가ver (5365:90496)
// Figma: 학사일정 · 주간 (nodeId 5556:34815), 홈 주간 캘린더 추가ver (5556:34771)
// 카드 라운드는 Figma가 이 카드만 16px(radius 변수)로 그렸다.
function HomeCalendarSection({ onOpen, onMore }: HomeCalendarSectionProps) {
const [today] = useState(getToday);
Expand Down
7 changes: 5 additions & 2 deletions src/features/home/components/HomeCalendarWeek.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "@/features/calendars/utils/calendarSchedules";
import { calendarsQueries } from "@/shared/entities/calendars/calendarsQueries";

// Figma 학사일정 · 주간(5365:90592)은 일정 카드 3개 아래에 "1건 더보기"를 둔다
// 일정 카드는 3개까지 보이고 나머지는 "N건 더보기"로 넘긴다
const VISIBLE_SCHEDULE_LIMIT = 3;

interface HomeCalendarWeekProps {
Expand Down Expand Up @@ -49,11 +49,13 @@ function HomeCalendarWeek({
<ul className="flex flex-col gap-2">
{daySchedules.slice(0, VISIBLE_SCHEDULE_LIMIT).map((schedule) => (
<li
className="flex flex-col gap-1 rounded-xl border border-line-normal-neutral p-3"
className="flex items-center justify-between gap-2 rounded-xl border border-line-normal-neutral p-3"
key={schedule.scheduleId}
>
{/* 한 줄 카드라 긴 제목은 기간을 밀어내지 않게 말줄임한다 */}
<Typography
as="p"
className="min-w-0 truncate"
color="semantic.label.normal"
variant="label2"
weight="bold"
Expand All @@ -62,6 +64,7 @@ function HomeCalendarWeek({
</Typography>
<Typography
as="p"
className="shrink-0"
color="semantic.label.alternative"
variant="caption1"
weight="regular"
Expand Down
4 changes: 2 additions & 2 deletions src/features/home/components/HomeCalendarWeekSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface HomeCalendarWeekSkeletonProps {
onSelect: (date: string) => void;
}

// 날짜는 일정과 상관없어서 점 없이 그대로 그리고, 일정 카드 한 장(62px: 위아래 12 + 제목 18 + 4 + 기간 16) 자리만 채운다.
// 날짜는 일정과 상관없어서 점 없이 그대로 그리고, 일정 카드 한 장(44px: 테두리 1 + 위아래 12 + 제목 18) 자리만 채운다.
function HomeCalendarWeekSkeleton({
weekDates,
today,
Expand All @@ -30,7 +30,7 @@ function HomeCalendarWeekSkeleton({
/>
<Skeleton
animation={animation}
height="62px"
height="44px"
radius="12px"
variant="rectangle"
width="100%"
Expand Down
Loading