From b377b51fde265bccbc855aade19f372c5e363be9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 24 Sep 2026 15:50:11 +0000 Subject: [PATCH] Revert "Show sponsor slots as coming soon until Creem approves. (#39)" This reverts commit 5c0a67b7aac691237c56820e13c1047bceaf5a9d. --- app/(marketing)/sponsors/page.tsx | 19 ++----------------- components/github-sponsor.tsx | 6 ------ lib/sponsors.ts | 10 +--------- tests/sponsors.test.mjs | 31 ++++--------------------------- 4 files changed, 7 insertions(+), 59 deletions(-) diff --git a/app/(marketing)/sponsors/page.tsx b/app/(marketing)/sponsors/page.tsx index 2390070..a593290 100644 --- a/app/(marketing)/sponsors/page.tsx +++ b/app/(marketing)/sponsors/page.tsx @@ -47,13 +47,12 @@ function SponsorSection({ tier }: { tier: SponsorTier }) {
  • {checkoutBlocked ? ( - Coming soon + On the way to approval ) : ( - isSponsorCheckoutBlocked(tier.checkoutHref) - ) return (
    - {checkoutComingSoon ? ( -

    - Coming soon -

    - ) : null}

    Sponsor 23rd

    @@ -98,12 +89,6 @@ export default async function SponsorsPage() { logo and name on this page, links to your site, and includes you in major release notes. The component registry stays free.

    - {checkoutComingSoon ? ( -

    - Checkout opens after Creem approves the store. Slots stay reserved - until then. -

    - ) : null}
    diff --git a/components/github-sponsor.tsx b/components/github-sponsor.tsx index 2b47db6..050af8c 100644 --- a/components/github-sponsor.tsx +++ b/components/github-sponsor.tsx @@ -1,6 +1,5 @@ import Link from "next/link" -import { SPONSOR_CHECKOUT_COMING_SOON } from "@/lib/sponsors" import { cn } from "@/lib/utils" export function GithubSponsor({ className }: { className?: string }) { @@ -13,11 +12,6 @@ export function GithubSponsor({ className }: { className?: string }) { )} > Sponsor - {SPONSOR_CHECKOUT_COMING_SOON ? ( - - Soon - - ) : null} ) } diff --git a/lib/sponsors.ts b/lib/sponsors.ts index c143db0..63aaad3 100644 --- a/lib/sponsors.ts +++ b/lib/sponsors.ts @@ -101,16 +101,8 @@ export function buildSponsorContactHref(tierName: string): string { return `mailto:${SPONSOR_CONTACT_EMAIL}?subject=${subject}` } -/** - * Live payment links are wired, but public checkout stays closed until Creem - * approves the store. Flip this off to open the slots. - */ -export const SPONSOR_CHECKOUT_COMING_SOON = true - -/** Test checkout, and any checkout while the store is still awaiting approval. */ +/** Creem test checkout stays off the page until the account is approved. */ export function isSponsorCheckoutBlocked(href: string): boolean { - if (SPONSOR_CHECKOUT_COMING_SOON) return true - try { const url = new URL(href) if (url.protocol !== "https:") return true diff --git a/tests/sponsors.test.mjs b/tests/sponsors.test.mjs index 9232968..98a4d34 100644 --- a/tests/sponsors.test.mjs +++ b/tests/sponsors.test.mjs @@ -93,15 +93,7 @@ test("checkout URLs must be https, otherwise mailto fallback is used", () => { ) }) -const sponsorCheckoutComingSoon = - /export const SPONSOR_CHECKOUT_COMING_SOON = true/.test(sponsorsLib) - -function isSponsorCheckoutBlocked( - href, - comingSoon = sponsorCheckoutComingSoon -) { - if (comingSoon) return true - +function isSponsorCheckoutBlocked(href) { try { const url = new URL(href) if (url.protocol !== "https:") return true @@ -116,27 +108,18 @@ test("sponsors page lists empty slots as Be here", () => { assert.match(sponsorsPage, /Be here/) }) -test("sponsor checkout stays coming soon until Creem approves", () => { - assert.equal(sponsorCheckoutComingSoon, true) - assert.match(sponsorsLib, /SPONSOR_CHECKOUT_COMING_SOON/) - assert.match(sponsorsLib, /if \(SPONSOR_CHECKOUT_COMING_SOON\) return true/) +test("Creem test checkout stays blocked until approval", () => { assert.match(sponsorsLib, /function isSponsorCheckoutBlocked/) assert.match(sponsorsLib, /pathname.startsWith\("\/test\/"\)/) assert.match(sponsorsPage, /isSponsorCheckoutBlocked\(tier\.checkoutHref\)/) - assert.match(sponsorsPage, /Coming soon/) - assert.doesNotMatch(sponsorsPage, /On the way to approval/) + assert.match(sponsorsPage, /On the way to approval/) for (const productId of [ "prod_4ZM6WkQrmCSBtFGCdYp7rZ", "prod_7jEvtpKnPoVXOAZLBnoWfA", "prod_MqDtYvXUGlGqgEz898MCA", "prod_3aZ8AxbA2h43IRUMxigep0", - "prod_1lz1o8e7HtglOuXbMRnSmc", ]) { - assert.equal( - isSponsorCheckoutBlocked(`https://www.creem.io/payment/${productId}`), - true - ) assert.equal( isSponsorCheckoutBlocked(`https://creem.io/test/product/${productId}`), true @@ -144,13 +127,9 @@ test("sponsor checkout stays coming soon until Creem approves", () => { } assert.equal( - isSponsorCheckoutBlocked("https://www.creem.io/payment/prod_gold", false), + isSponsorCheckoutBlocked("https://www.creem.io/payment/prod_gold"), false ) - assert.equal( - isSponsorCheckoutBlocked("https://creem.io/test/product/prod_gold", false), - true - ) assert.equal(isSponsorCheckoutBlocked("mailto:radiumcoders@gmail.com"), true) }) @@ -213,8 +192,6 @@ test("sponsors prices, terms, privacy, and support email match the shadscan layo assert.match(docsShell, /SUPPORT_EMAIL/) assert.match(sponsorLink, /href="\/sponsors"/) assert.match(sponsorLink, />Sponsor