chore: fix bug

This commit is contained in:
2026-03-17 10:38:44 +01:00
parent af74b39b22
commit c52cc280ac
2 changed files with 29 additions and 21 deletions
@@ -238,8 +238,7 @@ export default function OrdersScreen() {
StyleSheet.create({
container: { flex: 1, backgroundColor: colors.bgPrimary },
refreshRow: {
paddingHorizontal: spacing.l,
paddingBottom: spacing.s,
paddingBottom: spacing.m,
alignItems: "flex-start",
},
refreshBtn: {
@@ -579,20 +578,6 @@ export default function OrdersScreen() {
return (
<View style={styles.container}>
<View style={styles.refreshRow}>
<TouchableOpacity
style={styles.refreshBtn}
onPress={onRefresh}
disabled={refreshing}
>
<Ionicons
name="refresh-outline"
size={16}
color={refreshing ? colors.textMuted : colors.accent}
/>
<Text style={styles.refreshBtnText}>Actualiser</Text>
</TouchableOpacity>
</View>
<FlatList
data={commands}
keyExtractor={(item) => item.id.toString()}
@@ -604,7 +589,23 @@ export default function OrdersScreen() {
tintColor={colors.accent}
/>
}
contentContainerStyle={{ padding: spacing.l, paddingTop: 0 }}
contentContainerStyle={{ padding: spacing.l }}
ListHeaderComponent={
<View style={styles.refreshRow}>
<TouchableOpacity
style={styles.refreshBtn}
onPress={onRefresh}
disabled={refreshing}
>
<Ionicons
name="refresh-outline"
size={16}
color={refreshing ? colors.textMuted : colors.accent}
/>
<Text style={styles.refreshBtnText}>Actualiser</Text>
</TouchableOpacity>
</View>
}
ListEmptyComponent={
<Text style={styles.empty}>Aucune commande</Text>
}