/* UpWeDo landing — the "doing it together" sections: the three kinds of
company (the crowd, your buddy, your guide), a day in the app, and the
creator pitch.
Copy comes from `L` (I18N[lang]); shared pieces live in sections.jsx. */
const { useState } = React;
/* A thin bar that fills over one auto-cycle step (restarts via `key`). */
const CycleBar = ({ ms, color }) => (
);
/* ── THREE WAYS TO DO IT TOGETHER ───────────────────────────── */
/* Pick a kind of together (or let it cycle); the phone shows it in the app. */
const TOGETHER_MS = 6000;
const TOGETHER_META = [
{ color:'#2563EB', screen:CrowdPhone, icon:'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75' },
{ color:'#F47215', screen:BuddyPhone, icon:'M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01' },
{ color:'#8B5CF6', screen:GuidePhone, icon:'M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z' },
];
function Together({ L }) {
const m = useIsMobile();
const { ref, index, select, cycling } = useAutoCycle(TOGETHER_META.length, TOGETHER_MS);
const Screen = TOGETHER_META[index].screen;
return (
{L.together.items.map((it,i)=>{
const meta = TOGETHER_META[i], on = i===index;
return (
);
})}
👆 {L.together.hint}
);
}
/* ── A DAY WITH UPWEDO (how it works) ───────────────────────── */
/* Each moment of the day has a preview of what the app shows then. */
const DAY_COLORS = ['#F47215','#22C55E','#2563EB','#8B5CF6'];
const DAY_STEP_MS = 4500;
const WEEK_DONE = [true, true, false, true, true, true, true];
const glassCard = { borderRadius:18, background:'rgba(255,255,255,0.95)', boxShadow:'0 18px 48px rgba(0,0,0,0.3)', padding:'14px 16px', width:'100%', maxWidth:340 };
function ReminderMoment({ c, time }) {
return (
{time}
{c.app} · {c.when}
{c.title}
{c.body}
{c.actions.map((a,i)=>(
{a}
))}
);
}
/* "Not today" on a habit: it steps aside for today and the buddy says so. */
function NotTodayMoment({ c }) {
return (
{c.task}
{c.status}
{c.says}
);
}
function ClosedMoment({ c }) {
const r = 34, len = 2*Math.PI*r;
return (
{c.title}
{c.body}
✦ {c.quoteLabel}
“{c.quote}”
);
}
function WeekMoment({ c }) {
return (
{c.title}
{c.body}
{WEEK_DONE.map((done,i)=>(
{c.days[i]}
))}
🏅
{c.keepsakeLabel}
{c.keepsake}
);
}
function DayStory({ L }) {
const m = useIsMobile();
const steps = L.day.steps, mo = L.day.moments;
const { ref, index, select, cycling } = useAutoCycle(steps.length, DAY_STEP_MS);
const moments = [
,
,
,
,
];
const active = steps[index];
return (
{steps.map((s,i)=>{
const on = i===index;
return (
);
})}