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
+4
View File
@@ -8,6 +8,7 @@ import {
type GestureResponderEvent,
type StyleProp,
type ViewStyle,
type TextStyle,
} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
@@ -24,6 +25,7 @@ interface ButtonProps {
loading?: boolean;
fullWidth?: boolean;
style?: StyleProp<ViewStyle>;
textStyle?: StyleProp<TextStyle>;
leftAccessory?: React.ReactNode;
}
@@ -35,6 +37,7 @@ const ButtonComponent = ({
loading = false,
fullWidth = true,
style,
textStyle,
leftAccessory,
}: ButtonProps) => {
const theme = useTheme();
@@ -94,6 +97,7 @@ const ButtonComponent = ({
letterSpacing: variant === 'cyber' ? 2 : 0,
textTransform: variant === 'cyber' ? 'uppercase' : 'none',
},
textStyle,
]}
>
{title}
+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);
};