diff --git a/frontend-admin/src/screens/admin/SettingsScreen.tsx b/frontend-admin/src/screens/admin/SettingsScreen.tsx index 95d9d6db..787d45a7 100644 --- a/frontend-admin/src/screens/admin/SettingsScreen.tsx +++ b/frontend-admin/src/screens/admin/SettingsScreen.tsx @@ -56,6 +56,7 @@ function DeliveryScheduleSection({ colors: any; s: any; }) { + const { width: screenWidth } = useWindowDimensions(); const updateDay = (key: keyof DeliverySchedule, patch: Partial) => { onChange({ ...schedule, [key]: { ...schedule[key], ...patch } }); }; @@ -160,6 +161,9 @@ function PostalZonesSection({ colors: any; s: any; }) { + const { width: screenWidth } = useWindowDimensions(); + const inputMd = screenWidth < 380 ? 64 : 80; + const inputLg = screenWidth < 380 ? 80 : 100; const [expandedIndex, setExpandedIndex] = React.useState(null); const [creating, setCreating] = React.useState(false); const [form, setForm] = React.useState(EMPTY_FORM); @@ -525,6 +529,8 @@ function TiersSection({ accentColor: string; active: boolean; }) { + const { width: screenWidth } = useWindowDimensions(); + const inputSm = screenWidth < 380 ? 46 : 56; const updateTier = (i: number, field: keyof PointsTier, raw: string) => { const val = field === "points" ? parseInt(raw, 10) : parseFloat(raw); if (isNaN(val)) return; @@ -642,9 +648,7 @@ export default function SettingsScreen() { const { alert, showError, showSuccess, hideAlert } = useAlert(); const navigation = useNavigation(); const { width: screenWidth } = useWindowDimensions(); - const inputSm = screenWidth < 380 ? 46 : 56; const inputMd = screenWidth < 380 ? 64 : 80; - const inputLg = screenWidth < 380 ? 80 : 100; const [loading, setLoading] = useState(true); const [saving, setSaving] = useState(false);