eny.space Landingpage
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(global): add prelaunch global variable

+21
+5
.env.local.example
··· 1 1 NEXT_PUBLIC_APP_URL=http://localhost:3000 2 2 3 + # Prelaunch feature flag. 4 + # When `true`, hide elements intended to ship only after launch. 5 + NEXT_PUBLIC_PRELAUNCH=false 6 + 7 + 3 8 # Stripe keys 4 9 # https://dashboard.stripe.com/apikeys 5 10 NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_12345
+7
app/components/pricing/pricing-section.tsx
··· 7 7 import { ButtonLink } from "@/components/button-link"; 8 8 import { Heading } from "@/components/heading"; 9 9 import { Paragraph } from "@/components/paragraph"; 10 + import { prelaunch } from "@/lib/prelaunch"; 10 11 11 12 type PricingPlan = { 12 13 key: string; ··· 18 19 highlight?: boolean; 19 20 pdsDiskSizeGb: number; 20 21 features: string[]; 22 + launchOnly?: boolean; 21 23 }; 22 24 23 25 const PLANS: PricingPlan[] = [ ··· 58 60 period: "per month", 59 61 description: "Enterprise‑level performance.", 60 62 pdsDiskSizeGb: 200, 63 + launchOnly: true, 61 64 features: [ 62 65 "Unlimited storage", 63 66 "Custom domain support", ··· 69 72 ]; 70 73 71 74 export function PricingSection() { 75 + // Hide the pricing block entirely during prelaunch mode. 76 + // This keeps the "prelaunch vs launch" behavior controlled by one global flag. 77 + if (prelaunch) return null; 78 + 72 79 return ( 73 80 <section 74 81 id="pricing"
+9
lib/prelaunch.ts
··· 1 + /** 2 + * Feature flag for “prelaunch” mode. 3 + * 4 + * Set `NEXT_PUBLIC_PRELAUNCH=true` to enable prelaunch gating that hides 5 + * elements meant to ship only after launch. 6 + */ 7 + export const prelaunch = 8 + process.env.NEXT_PUBLIC_PRELAUNCH?.toLowerCase() === "true"; 9 +