fix: settings sheet eating into notch (but now there's some leftover ugly bar that didn't move)

This commit is contained in:
Adrian Castro
2024-03-20 13:55:37 +01:00
parent e3d252708d
commit 9c232fd838
2 changed files with 22 additions and 17 deletions

View File

@@ -42,7 +42,7 @@ const defineConfig = (): ExpoConfig => ({
[ [
"expo-screen-orientation", "expo-screen-orientation",
{ {
initialOrientation: "PORTRAIT_UP", initialOrientation: "ALL",
}, },
], ],
[ [

View File

@@ -1,4 +1,5 @@
import type { SheetProps, ViewProps } from "tamagui"; import type { SheetProps, ViewProps } from "tamagui";
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
import { import {
ScrollView, ScrollView,
Separator, Separator,
@@ -52,22 +53,26 @@ function SettingsSheetFrame({
isLoading?: boolean; isLoading?: boolean;
}) { }) {
return ( return (
<Sheet.Frame <SafeAreaProvider>
backgroundColor="$playerSettingsBackground" <SafeAreaView style={{ flex: 1 }}>
padding="$5" <Sheet.Frame
gap="$4" backgroundColor="$playerSettingsBackground"
> padding="$5"
{isLoading && ( gap="$4"
<Spinner >
size="large" {isLoading && (
color="$loadingIndicator" <Spinner
style={{ size="large"
position: "absolute", color="$loadingIndicator"
}} style={{
/> position: "absolute",
)} }}
{!isLoading && children} />
</Sheet.Frame> )}
{!isLoading && children}
</Sheet.Frame>
</SafeAreaView>
</SafeAreaProvider>
); );
} }