// Card at the end of the chapter while reading a plan: step to the next chapter of // today's reading, or finish the day and roll into the next one. export default function PlanFooter({ info, label, onNext, onNextDay, onFinish }) { if (!info || info.position === 0) return null; const last = info.position === info.total; const nextRef = !last ? info.refs[info.position] : null; const btn = 'rounded-full bg-[var(--r-accent)] px-5 py-2 text-sm font-medium text-[var(--r-on)]'; return (
{info.plan.title} · Day {info.dayIndex + 1}
{!last && ( <>{info.total - info.position} more chapter{info.total - info.position === 1 ? '' : 's'} today
> )} {last && info.nextDayRefs?.length > 0 && ( <>That’s Day {info.dayIndex + 1}
> )} {last && !info.nextDayRefs?.length && ( <>Last day of the plan
> )}