From c52cc280ac5d08b6d75031af02a1ef66a7a17c0f Mon Sep 17 00:00:00 2001 From: Xor290 Date: Tue, 17 Mar 2026 10:38:44 +0100 Subject: [PATCH] chore: fix bug --- .../src/screens/admin/OrdersScreen.tsx | 35 ++++++++++--------- mobile/src/services/pushNotifications.ts | 15 +++++--- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/frontend-admin/src/screens/admin/OrdersScreen.tsx b/frontend-admin/src/screens/admin/OrdersScreen.tsx index 39fe4d6b..39820833 100644 --- a/frontend-admin/src/screens/admin/OrdersScreen.tsx +++ b/frontend-admin/src/screens/admin/OrdersScreen.tsx @@ -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 ( - - - - Actualiser - - 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={ + + + + Actualiser + + + } ListEmptyComponent={ Aucune commande } diff --git a/mobile/src/services/pushNotifications.ts b/mobile/src/services/pushNotifications.ts index 17f561e7..fedd36da 100644 --- a/mobile/src/services/pushNotifications.ts +++ b/mobile/src/services/pushNotifications.ts @@ -19,7 +19,9 @@ function handleRegistrationError(errorMessage: string) { Alert.alert("Push Notification Error", errorMessage); } -export async function registerForPushNotifications(): Promise { +export async function registerForPushNotifications(): Promise< + string | undefined +> { if (Platform.OS === "android") { await Notifications.setNotificationChannelAsync("default", { name: "default", @@ -36,14 +38,17 @@ export async function registerForPushNotifications(): Promise