chore: fix UI

This commit is contained in:
2026-04-26 19:12:59 +02:00
parent d39c49cce6
commit b50c31ef73
@@ -56,6 +56,7 @@ function DeliveryScheduleSection({
colors: any;
s: any;
}) {
const { width: screenWidth } = useWindowDimensions();
const updateDay = (key: keyof DeliverySchedule, patch: Partial<DaySchedule>) => {
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<number | null>(null);
const [creating, setCreating] = React.useState(false);
const [form, setForm] = React.useState<NewZoneForm>(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);