Remove unused renderField from elements index
This commit is contained in:
@@ -1575,16 +1575,6 @@ const RenderFileUpload = (field) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderField = ({ input, label, type, meta: { touched, error } }) => (
|
|
||||||
<div>
|
|
||||||
<label>{label}</label>
|
|
||||||
<div>
|
|
||||||
<input {...input} type={type} placeholder={label} />
|
|
||||||
{touched && error && <span>{error}</span>}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
export const FieldArrayForm = (props) => {
|
export const FieldArrayForm = (props) => {
|
||||||
const {
|
const {
|
||||||
name,
|
name,
|
||||||
|
|||||||
@@ -3395,3 +3395,29 @@ Validation:
|
|||||||
Follow-ups:
|
Follow-ups:
|
||||||
|
|
||||||
- Optional: localize a dedicated `upload-progress-x-of-y` translation key if copy needs stronger grammatical control per locale.
|
- Optional: localize a dedicated `upload-progress-x-of-y` translation key if copy needs stronger grammatical control per locale.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### CL-094: 22500 `components/elements/index.js` Phase 2 bounded cleanup (remove dead `renderField`)
|
||||||
|
|
||||||
|
date: 2026-04-07
|
||||||
|
author: Cline
|
||||||
|
scope: `components/elements/index.js`
|
||||||
|
type: change
|
||||||
|
rationale: Execute the next smallest low-risk Phase 2 slice by removing the local `renderField` utility after confirming it is unused in the repo.
|
||||||
|
impact: No behavior change intended; dead code removal only. No auth/security/middleware/API changes. EN/CY and accessibility behavior remain unchanged.
|
||||||
|
status: completed
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
|
||||||
|
- Confirmed `renderField` had no usages outside its declaration.
|
||||||
|
- Removed the unused local `renderField` function from `components/elements/index.js`.
|
||||||
|
- Kept all field component exports, routing, and existing render paths unchanged.
|
||||||
|
|
||||||
|
Validation:
|
||||||
|
|
||||||
|
- `npx eslint components/elements/index.js` -> pass
|
||||||
|
|
||||||
|
Follow-ups:
|
||||||
|
|
||||||
|
- Continue Phase 2 with one bounded no-behavior-change slice, likely next lowest-risk renderer extraction from `components/elements/index.js`.
|
||||||
|
|||||||
Reference in New Issue
Block a user