refactor(client): remove orphaned dead logic flagged by ESLint (R2c)
- MobileBillRow: an autopayClass useMemo computed a badge class that was never rendered (dead since a refactor) -> removed. - CategoriesPage: onRowKeyDown handler was never wired (keyboard toggle is now the dedicated chevron button, per the QA-B14-02 a11y fix) -> removed. - BillModal: unused isDebtCategory derived flag -> removed. Remaining lint warnings are unused imports / HMR / vestigial destructures (non-correctness, non-blocking, now tracked by eslint). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b8d394061b
commit
02395b9ad4
|
|
@ -142,7 +142,6 @@ export default function BillModal({ bill, initialBill, categories, onClose, onSa
|
||||||
const [bulkUnmatch, setBulkUnmatch] = useState(null);
|
const [bulkUnmatch, setBulkUnmatch] = useState(null);
|
||||||
const [bulkBusy, setBulkBusy] = useState(false);
|
const [bulkBusy, setBulkBusy] = useState(false);
|
||||||
|
|
||||||
const isDebtCategory = isDebtCat(categories, categoryId);
|
|
||||||
const isSnowballCategory = isSnowballCat(categories, categoryId);
|
const isSnowballCategory = isSnowballCat(categories, categoryId);
|
||||||
const showOnSnowball = snowballInclude || (isSnowballCategory && !snowballExempt);
|
const showOnSnowball = snowballInclude || (isSnowballCategory && !snowballExempt);
|
||||||
const canAutoMarkPaid = autopay && autodraftStatus === 'assumed_paid';
|
const canAutoMarkPaid = autopay && autodraftStatus === 'assumed_paid';
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,6 @@ export const MobileBillRow = React.memo(function MobileBillRow({ bill, onEdit, o
|
||||||
);
|
);
|
||||||
}, [bill.active]);
|
}, [bill.active]);
|
||||||
|
|
||||||
const autopayClass = useMemo(() => {
|
|
||||||
return cn(
|
|
||||||
'rounded bg-emerald-500/20 px-1.5 py-0.5 text-[10px] font-semibold text-emerald-300',
|
|
||||||
bill.autopay_enabled ? 'opacity-100' : 'opacity-0',
|
|
||||||
);
|
|
||||||
}, [bill.autopay_enabled]);
|
|
||||||
|
|
||||||
const toggleBtnClass = useMemo(() => {
|
const toggleBtnClass = useMemo(() => {
|
||||||
return cn(
|
return cn(
|
||||||
'h-8 px-2.5 text-xs',
|
'h-8 px-2.5 text-xs',
|
||||||
|
|
|
||||||
|
|
@ -270,13 +270,6 @@ export default function CategoriesPage() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onRowKeyDown(event, id) {
|
|
||||||
if (event.key === 'Enter' || event.key === ' ') {
|
|
||||||
event.preventDefault();
|
|
||||||
toggleCategory(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleAdd(e) {
|
async function handleAdd(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const trimmed = newName.trim();
|
const trimmed = newName.trim();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue