Skip to content

fix(ts): dictionary type drift in marketing/content + example (Class 3) #13

Description

@abdout

Severity

P1 — Build hygiene

Context

Audit Class 3 — 6 TS errors caused by stale dictionary references and prop drilling to components that don't accept those props.

Errors

File Line Error
`example/internationalized-content.tsx` 18, 21 `t.marketing.hero.cta` and `.learnMore` don't exist; hero only has `appointment` and `services`
`marketing/content.tsx` 105 `` — `FeatureCards` is the prop-less default export from `./card`
`marketing/content.tsx` 108 `` — `Parallax` reads i18n via `useTranslations()` internally
`marketing/content.tsx` 117 `` — same pattern, internal hook
`marketing/content.tsx` 120 `` — same pattern

Fix

  • `internationalized-content.tsx` (a defined-but-never-imported demo): map the stale keys to the actual hero keys (`appointment`, `services`).
  • `content.tsx`: drop the `dictionary` and `params` props from the four components that handle i18n internally. `Ready` (line 111) is left intact — it does accept those props.

Acceptance criteria

  • `pnpm tsc --noEmit` clean for the two touched files
  • Marketing page renders all sections in /en and /ar without prop-type warnings
  • No visual regression (the dropped props were unused — components already pull from `useTranslations`)

Reference

Audit log: `/Users/abdout/.claude/plans/marketing-tsc-audit.log`
Plan: `/Users/abdout/.claude/plans/read-marketing-write-full-tidy-dragon.md` — PR-5b

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