Skip to content

bug: Celebrate Her page fetches a non-existent endpoint and expects the wrong payload shape #300

Description

@yingliu-data

Bug Report

The Celebrate Her page fetches a non-existent endpoint, so live CMS content can never load, and the component's expected shape doesn't match the real payload.

  • src/pages/about-us/celebrate-her.tsx:36fetchData('about-us/celebrate-her'). The backend route is GET /api/cms/v1/celebrateHer (wcc-backend/.../controller/AboutController.java:94), so about-us/celebrate-her 404s and the page always renders the bundled static JSON.
  • The live payload shape ({ id, heroSection, section, items }, per init-data/celebrateHerPage.json) does not match the component's expected { celebrateHer: { lists: [] } } (line ~18), so fixing only the path would crash the render.

Reproduction

Deploy with CMS content managed via the API → the Celebrate Her page ignores it and shows bundled JSON; pointing it at the correct endpoint without fixing the shape would throw during render.

Severity

Medium

Potential Risk

  • Admin-managed Celebrate Her content never appears; a naive path fix would crash the page.

Suggested Fix

  • Fetch the correct endpoint (celebrateHer).
  • Update the component to consume the real payload shape (heroSection/section/items), or add a mapping layer.
  • Add a test rendering the page from the real payload shape.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions