Skip to content

Give shared components explicit prop types #163

Description

@RaymondAbiola

Summary

Some shared components accept loosely typed props, which makes them easy to misuse and hides mistakes until render time. Tightening the types moves those errors to the typecheck.

Acceptance criteria

  • Shared components declare explicit prop types.
  • Optional props declare their defaults.
  • The typecheck passes with no behaviour change.

Getting started

Fork this repository, clone your fork, and add this repo as upstream:

git clone https://github.com/<your-username>/tricklepay-frontend.git
cd tricklepay-frontend
git remote add upstream https://github.com/TricklePay/tricklepay-frontend.git

Create a branch for this issue:

git checkout -b refactor/issue-163

Suggested commit message:

refactor: tighten shared component prop types

Run npm run lint, npm run typecheck, npm test, and npm run build before opening a pull request and linking this issue.

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

    good first issueGood for newcomerspolishVisual and metadata polish

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions