Skip to content

Commit

Permalink
fix: wrap only FloatingActionButton in SafeAreaView for AddonPage
Browse files Browse the repository at this point in the history
  • Loading branch information
PalmDevs committed Oct 23, 2024
1 parent 30742ba commit d98ed76
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions src/core/ui/components/AddonPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,28 +181,30 @@ export default function AddonPage<T extends object>({ CardComponent, ...props }:

return (
<ErrorBoundary>
<SafeAreaView>
<FlashList
data={results}
extraData={search}
estimatedItemSize={136}
ListHeaderComponent={headerElement}
ListEmptyComponent={() => <View style={{ gap: 12, padding: 12, alignItems: "center" }}>
<Image source={findAssetId("devices_not_found")} />
<Text variant="text-lg/semibold" color="text-normal">
Hmmm... could not find that!
</Text>
</View>}
contentContainerStyle={{ padding: 8, paddingHorizontal: 12 }}
ItemSeparatorComponent={() => <View style={{ height: 8 }} />}
ListFooterComponent={props.ListFooterComponent}
renderItem={({ item }: any) => <CardComponent item={item.obj} result={item} />}
/>
{props.installAction && <FloatingActionButton
icon={findAssetId("PlusLargeIcon")}
onPress={onInstallPress}
/>}
</SafeAreaView>
<FlashList
data={results}
extraData={search}
estimatedItemSize={136}
ListHeaderComponent={headerElement}
ListEmptyComponent={() => <View style={{ gap: 12, padding: 12, alignItems: "center" }}>
<Image source={findAssetId("devices_not_found")} />
<Text variant="text-lg/semibold" color="text-normal">
Hmmm... could not find that!
</Text>
</View>}
contentContainerStyle={{ padding: 8, paddingHorizontal: 12 }}
ItemSeparatorComponent={() => <View style={{ height: 8 }} />}
ListFooterComponent={props.ListFooterComponent}
renderItem={({ item }: any) => <CardComponent item={item.obj} result={item} />}
/>
{props.installAction && (
<SafeAreaView>
<FloatingActionButton
icon={findAssetId("PlusLargeIcon")}
onPress={onInstallPress}
/>
</SafeAreaView>
)}
</ErrorBoundary>
);
}

0 comments on commit d98ed76

Please sign in to comment.