// create.jsx — Create tab: Weekly Songwriting Challenge + Daily Prompt Generator // Submissions persist to localStorage so artists keep a writing log. const { useState: useStateC, useEffect: useEffectC, useRef: useRefC } = React; const { Card, Chip, TopBar, IconBtn, DisplayHeading, Icon } = window.LAUNCH_SCREENS_1; // ──────────────────────────────────────────────────────── // Data — challenge & prompt bank // ──────────────────────────────────────────────────────── const WEEKLY_CHALLENGE = { id: 'w19-2026', week: 'WEEK 19 · MAY 11 — 17', title: 'WRITE A CHORUS USING ONLY CONVERSATIONAL LANGUAGE', brief: 'No metaphors. No big words. Write a chorus that sounds like something you\'d actually say to a friend at 2am. Real. Honest. Plain. The hook should feel like a sentence you didn\'t mean to start writing.', deadline: 'SUN · 11:59 PM ET', daysLeft: 3, prize: "TOP 3 GET A FREE IN-DEPTH EVAL + FEATURED IN NEXT WEEK'S DROPS", entries: 487, }; const PROMPTS = [ 'Write from the perspective of regret.', 'Describe a memory using only visuals.', 'Write a hook under 8 words.', 'Open with a question. End with the same question.', 'Write a verse without using the word "I".', 'Make a chorus out of what you almost texted.', 'Tell the same story twice — verse one is the lie, verse two is the truth.', 'Pick a city. Write about leaving it.', 'Use a weather word as the title.', 'Write a love song without saying love.', 'Make the bridge the most honest part.', 'Start the song mid-sentence.', 'Write a chorus a 7-year-old could sing.', 'Use only one-syllable words for the first verse.', 'Build the whole song around a single noun.', 'Replace every "you" with a name.', 'Write to someone you haven\'t spoken to in years.', 'Make the title the worst line in the song.', 'Start in a kitchen. End in a car.', 'Write a song that has to be sung at 4am.', 'Use a question your mom used to ask.', 'Write the verse you\'d never play for your dad.', 'Open with a list. End with a refusal.', 'Make the chorus a confession.', 'Pick a song you hate. Steal its structure.', 'Write a song that fits inside one room.', ]; // Sample community entries — what other artists submitted this week const COMMUNITY_ENTRIES = [ { handle: 'sasha.vee', lbl: 'SV', color: '#CAFF33', title: 'just don\'t go yet', snippet: '"just don\'t go yet / i made coffee / i know it\'s late / but the rain hasn\'t / i made coffee / just don\'t go yet"', likes: 142, comments: 23, fav: true, }, { handle: 'kai.park', lbl: 'KP', color: '#C72820', title: 'so what now', snippet: '"so what now / you got the keys / you got the car / you got the better half of me / so what now"', likes: 89, comments: 14, }, { handle: 'theo.m', lbl: 'TM', color: '#7A5AE0', title: 'tell me you mean it', snippet: '"tell me you mean it / look at me when you say it / i\'ll believe you / i swear i\'ll believe you / just tell me you mean it"', likes: 67, comments: 19, }, ]; // ──────────────────────────────────────────────────────── // Storage — submissions log lives in localStorage // Key: 'launch.submissions' = [{ id, kind, title, text, prompt, ts, week }] // ──────────────────────────────────────────────────────── function loadSubmissions() { try { const raw = localStorage.getItem('launch.submissions'); if (!raw) return []; return JSON.parse(raw); } catch (e) { return []; } } function saveSubmissions(list) { try { localStorage.setItem('launch.submissions', JSON.stringify(list)); } catch (e) {} } function fmtDate(ts) { const d = new Date(ts); const today = new Date(); const isToday = d.toDateString() === today.toDateString(); if (isToday) return 'TODAY · ' + d.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }).toUpperCase(); const yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1); if (d.toDateString() === yesterday.toDateString()) return 'YESTERDAY'; return d.toLocaleDateString([], { month: 'short', day: 'numeric' }).toUpperCase(); } // ──────────────────────────────────────────────────────── // Submission composer modal — for both weekly and daily // ──────────────────────────────────────────────────────── function ComposerSheet({ theme, kind, prompt, onClose, onSubmit }) { const [title, setTitle] = useStateC(''); const [text, setText] = useStateC(''); const taRef = useRefC(null); useEffectC(() => { // small focus delay so the sheet has rendered const t = setTimeout(() => { if (taRef.current) taRef.current.focus(); }, 150); return () => clearTimeout(t); }, []); const canSubmit = text.trim().length > 0; return (
{/* handle */}
{/* head */}
★ {kind === 'weekly' ? 'WEEKLY CHALLENGE' : 'DAILY PROMPT'}
{prompt}
{/* form */}
setTitle(e.target.value)} placeholder="Title (optional)" style={{ width: '100%', padding: '12px 14px', borderRadius: 12, background: theme.surface, border: `1px solid ${theme.border}`, color: theme.text, fontFamily: theme.fontDisplay, fontSize: 20, outline: 'none', letterSpacing: 0.3, textTransform: 'uppercase', }} />