Fix TypeScript compilation errors across components, selectors, and profile module

This commit is contained in:
Abin Toppo
2026-05-26 16:51:33 +05:30
parent 9ac5e95d52
commit d7907e1d64
11 changed files with 61 additions and 30 deletions
+7 -3
View File
@@ -51,9 +51,13 @@ const parseDDMMYYYY = (str: string | undefined): Date | null => {
if (!str) return null;
const parts = str.split('/');
if (parts.length !== 3) return null;
const d = parseInt(parts[0], 10);
const m = parseInt(parts[1], 10) - 1;
const y = parseInt(parts[2], 10);
const part0 = parts[0];
const part1 = parts[1];
const part2 = parts[2];
if (!part0 || !part1 || !part2) return null;
const d = parseInt(part0, 10);
const m = parseInt(part1, 10) - 1;
const y = parseInt(part2, 10);
if (isNaN(d) || isNaN(m) || isNaN(y)) return null;
return new Date(y, m, d);
};