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