From c7226a4ed959ca7d28b42f5afd27181b8a924b86 Mon Sep 17 00:00:00 2001 From: billisdead Date: Sat, 16 May 2026 11:44:34 +0200 Subject: [PATCH] correction request --- artifacts/postiz-mobile/app/(tabs)/compose.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/artifacts/postiz-mobile/app/(tabs)/compose.tsx b/artifacts/postiz-mobile/app/(tabs)/compose.tsx index 8f48bca..042bb6a 100644 --- a/artifacts/postiz-mobile/app/(tabs)/compose.tsx +++ b/artifacts/postiz-mobile/app/(tabs)/compose.tsx @@ -30,7 +30,6 @@ export default function ComposeScreen() { const insets = useSafeAreaInsets(); const { client, isConfigured, apiKey, baseUrl } = usePostiz(); const queryClient = useQueryClient(); - const [content, setContent] = useState(""); const [selectedChannels, setSelectedChannels] = useState([]); const [postNow, setPostNow] = useState(false); @@ -45,10 +44,10 @@ export default function ComposeScreen() { const { data: integrations, isLoading: loadingIntegrations } = useQuery({ - queryKey: ["integrations"], + queryKey: ["integrations", !!client], queryFn: async () => { if (!client) return []; - const res = await client.get("/integrations"); + const res = await client.get("integrations"); return Array.isArray(res.data) ? res.data : res.data?.integrations ?? []; }, enabled: !!client, @@ -134,7 +133,7 @@ export default function ComposeScreen() { content: [{ content: content.trim(), image: media }], integrations: selectedChannels, }; - await client.post("/posts", payload); + await client.post("posts", payload); Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success); Alert.alert( "Posted!", @@ -167,6 +166,7 @@ export default function ComposeScreen() { day: "numeric", year: "numeric", }); + const formatTimeLabel = (d: Date) => d.toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" }); @@ -191,8 +191,7 @@ export default function ComposeScreen() { styles.container, { paddingTop: Platform.OS === "web" ? 67 : 16, - paddingBottom: - Platform.OS === "web" ? 100 : insets.bottom + 80, + paddingBottom: Platform.OS === "web" ? 100 : insets.bottom + 80, }, ]} bottomOffset={80} @@ -253,6 +252,7 @@ export default function ComposeScreen() { CHANNELS + {loadingIntegrations ? ( ) : (integrations ?? []).length === 0 ? (