Bug: NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT reads the TOP env var (copy/paste)

Author: evan188199-techCreated Jul 7, 2026Updated Jul 7, 2026

Bug

In src/env.ts, the runtime-env mapping for NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT reads from the TOP env var instead of the BOTTOM one — a copy/paste error:

typescript
// line 163-164
NEXT_PUBLIC_TOP_BMI_BANNER_AD_SLOT: process.env.NEXT_PUBLIC_TOP_BMI_BANNER_AD_SLOT,
NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT: process.env.NEXT_PUBLIC_TOP_BMI_BANNER_AD_SLOT,  // ← reads TOP, not BOTTOM

Impact

Setting NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT has no effect — the bottom BMI ad slot always gets the value of NEXT_PUBLIC_TOP_BMI_BANNER_AD_SLOT. A publisher who configures different ad slots for top vs. bottom (the normal case) will see the same ad in both positions on the BMI calculator page.

Fix

typescript
NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT: process.env.NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT,

I have a PR ready.