add episode download section

This commit is contained in:
Jorrin
2024-04-08 21:22:09 +02:00
parent ae5505da7f
commit 96b00064c6
10 changed files with 263 additions and 105 deletions

View File

@@ -1,3 +1,4 @@
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { ScrollView } from "tamagui";
import { LinearGradient } from "tamagui/linear-gradient";
@@ -7,6 +8,7 @@ interface Props {
children?: React.ReactNode;
onScrollBeginDrag?: () => void;
onMomentumScrollEnd?: () => void;
showHeader?: boolean;
scrollEnabled?: boolean;
keyboardDismissMode?: "none" | "on-drag" | "interactive";
keyboardShouldPersistTaps?: "always" | "never" | "handled";
@@ -17,11 +19,14 @@ export default function ScreenLayout({
children,
onScrollBeginDrag,
onMomentumScrollEnd,
showHeader = true,
scrollEnabled,
keyboardDismissMode,
keyboardShouldPersistTaps,
contentContainerStyle,
}: Props) {
const insets = useSafeAreaInsets();
return (
<LinearGradient
flex={1}
@@ -38,8 +43,9 @@ export default function ScreenLayout({
start={[0, 0]}
end={[1, 1]}
flexGrow={1}
paddingTop={showHeader ? insets.top : insets.top + 50}
>
<Header />
{showHeader && <Header />}
<ScrollView
onScrollBeginDrag={onScrollBeginDrag}
onMomentumScrollEnd={onMomentumScrollEnd}