Skip to content

[3/7] Remove t Prop Drilling in Tag and Organization Components #7433

@kushu30

Description

@kushu30

Context

As part of the repository-wide translation compliance cleanup (post #7364), this batch addresses Tag and Organization-related components that are currently passing t as a prop/parameter instead of calling useTranslation() locally.

This batch is domain-scoped to keep refactors reviewable and reduce merge conflicts.


Affected Files

Tag-related:

  • src/components/AdminPortal/TagActions/TagActions.tsx
  • src/components/AdminPortal/TagActions/Node/TagNode.tsx
  • src/screens/AdminPortal/ManageTag/editModal/EditUserTagModal.tsx
  • src/components/AdminPortal/AddPeopleToTag/AddPeopleToTag.tsx

Organization-related:

  • src/components/AdminPortal/OrgList/modal/OrganizationModal.tsx
  • src/screens/AdminPortal/OrgList/OrgList.tsx
  • src/screens/UserPortal/Organizations/Organizations.tsx

Required Refactor

For each affected file:

  • Remove t from component props and parameters
  • Eliminate t prop drilling chains
  • Import useTranslation from react-i18next
  • Call const { t } = useTranslation() locally
  • Ensure correct namespace usage
  • Update related tests where t was mocked or injected

No UI or functional behavior should change.


Acceptance Criteria

  • No component in this batch receives t as a prop
  • All translation calls originate from local useTranslation()
  • Tests pass without flakiness
  • No coverage regression
  • Translation lint checks pass in CI
  • Changes are limited strictly to this domain

Metadata

Metadata

Labels

cleanupRemove non-functional or unnecessary coderefactorRefactoring tasksunapproved

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions