Lumen & Gesso / website · lumengesso.com / app / login / check-email / page.tsx
| 1 | 'use client'; |
| 2 | |
| 3 | import { Suspense, useEffect } from 'react'; |
| 4 | import Link from 'next/link'; |
| 5 | import { useSearchParams } from 'next/navigation'; |
| 6 | |
| 7 | // Post-payment confirmation. Designed to fit in a single viewport (no |
| 8 | // scrolling on a standard laptop) — two-column composition on desktop, |
| 9 | // stacked on mobile. Mood: a quiet typeset acknowledgement card you |
| 10 | // might find tucked inside a gallery program. No confetti, no shout. |
| 11 | export default function CheckEmailPage() { |
| 12 | return ( |
| 13 | <Suspense fallback={<main className="thanks"><div className="thanks__inner" /></main>}> |
| 14 | <Thanks /> |
| 15 | </Suspense> |
| 16 | ); |
| 17 | } |
| 18 | |
| 19 | function Thanks() { |
| 20 | const params = useSearchParams(); |
| 21 | const email = params.get('email') ?? 'your email'; |
| 22 | const orderId = params.get('orderId'); |
| 23 | const paid = params.get('paid') === '1'; |
| 24 | |
| 25 | // Clear the "pending order" pointer once payment has succeeded so a |
| 26 | // subsequent /builder visit doesn't bounce the customer to the |
| 27 | // resume screen for an order that's already paid + queued. Also drop |
| 28 | // the data-build-active attribute the pre-paint script stamped onto |
| 29 | // <html> from the (still-set) sessionStorage keys when this page |
| 30 | // loaded — otherwise the header keeps showing "Resume portrait" on |
| 31 | // this very view, since clearing sessionStorage alone doesn't |
| 32 | // re-run that script. |
| 33 | useEffect(() => { |
| 34 | if (!paid) return; |
| 35 | try { |
| 36 | sessionStorage.removeItem('lg_pending_order_id'); |
| 37 | sessionStorage.removeItem('lg_build_progress'); |
| 38 | document.documentElement.removeAttribute('data-build-active'); |
| 39 | } catch {} |
| 40 | }, [paid]); |
| 41 | |
| 42 | return ( |
| 43 | <main className="thanks"> |
| 44 | <div className="thanks__bg" aria-hidden="true" /> |
| 45 | |
| 46 | <div className="thanks__inner"> |
| 47 | <header className="thanks__head"> |
| 48 | <p className="thanks__eyebrow"> |
| 49 | <span className="thanks__eyebrow-mark" aria-hidden="true">✦</span> |
| 50 | Order received |
| 51 | </p> |
| 52 | |
| 53 | <h1 className="thanks__title"> |
| 54 | Your portrait <em>is in</em> the studio. |
| 55 | </h1> |
| 56 | |
| 57 | <p className="thanks__lede"> |
| 58 | We’ve sent your receipt and a tracking link to |
| 59 | </p> |
| 60 | <p className="thanks__email">{email}</p> |
| 61 | </header> |
| 62 | |
| 63 | <section className="thanks__next" aria-labelledby="thanks-next-h"> |
| 64 | <h2 className="thanks__next-head" id="thanks-next-h"> |
| 65 | What happens next |
| 66 | </h2> |
| 67 | <ol className="thanks__timeline"> |
| 68 | <li className="thanks__step"> |
| 69 | <span className="thanks__num" aria-hidden="true">01</span> |
| 70 | <div className="thanks__step-body"> |
| 71 | <h3 className="thanks__step-title">Your proof, by email</h3> |
| 72 | <p className="thanks__step-text"> |
| 73 | Within one business day. We work Monday–Friday — orders |
| 74 | placed Friday arrive Monday. |
| 75 | </p> |
| 76 | </div> |
| 77 | </li> |
| 78 | <li className="thanks__step"> |
| 79 | <span className="thanks__num" aria-hidden="true">02</span> |
| 80 | <div className="thanks__step-body"> |
| 81 | <h3 className="thanks__step-title">Revise until it’s right</h3> |
| 82 | <p className="thanks__step-text"> |
| 83 | Free revisions. Approve only when it captures them. |
| 84 | </p> |
| 85 | </div> |
| 86 | </li> |
| 87 | <li className="thanks__step"> |
| 88 | <span className="thanks__num" aria-hidden="true">03</span> |
| 89 | <div className="thanks__step-body"> |
| 90 | <h3 className="thanks__step-title">Printed & shipped</h3> |
| 91 | <p className="thanks__step-text"> |
| 92 | Shipped to your door around ten days from approval, shipping included at cost. |
| 93 | </p> |
| 94 | </div> |
| 95 | </li> |
| 96 | </ol> |
| 97 | </section> |
| 98 | |
| 99 | <footer className="thanks__foot"> |
| 100 | <div className="thanks__receipt"> |
| 101 | <div className="thanks__receipt-row"> |
| 102 | <span className="thanks__receipt-label">Sent to</span> |
| 103 | <span className="thanks__receipt-value">{email}</span> |
| 104 | </div> |
| 105 | {orderId && ( |
| 106 | <div className="thanks__receipt-row"> |
| 107 | <span className="thanks__receipt-label">Commission №</span> |
| 108 | <span className="thanks__receipt-value thanks__receipt-value--mono"> |
| 109 | {orderId} |
| 110 | </span> |
| 111 | </div> |
| 112 | )} |
| 113 | </div> |
| 114 | |
| 115 | <nav className="thanks__actions" aria-label="More from the studio"> |
| 116 | <span className="thanks__hint">You can close this tab.</span> |
| 117 | <span className="thanks__actions-divider" aria-hidden="true">·</span> |
| 118 | <Link className="thanks__action" href="/#gallery">Gallery</Link> |
| 119 | <span className="thanks__actions-divider" aria-hidden="true">·</span> |
| 120 | <Link className="thanks__action" href="/refund-policy">Refund policy</Link> |
| 121 | </nav> |
| 122 | </footer> |
| 123 | </div> |
| 124 | </main> |
| 125 | ); |
| 126 | } |