Skip to content

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

Description

@evan188199-tech

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:

// 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

NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT: process.env.NEXT_PUBLIC_BOTTOM_BMI_BANNER_AD_SLOT,

I have a PR ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions