fix: use zstack to keep searchbar visible on search screen

This commit is contained in:
Adrian Castro
2024-04-02 01:25:59 +02:00
parent 6a4a19a41c
commit 07b9f7cd4b

View File

@@ -7,7 +7,7 @@ import Animated, {
withTiming,
} from "react-native-reanimated";
import { useQuery } from "@tanstack/react-query";
import { View } from "tamagui";
import { View, XStack } from "tamagui";
import { getMediaPoster, searchTitle } from "@movie-web/tmdb";
@@ -99,6 +99,7 @@ export default function SearchScreen() {
return (
<ScreenLayout>
<XStack flex={1}>
<ScrollView
onScrollBeginDrag={handleScrollBegin}
onMomentumScrollEnd={handleScrollEnd}
@@ -127,7 +128,7 @@ export default function SearchScreen() {
<Animated.View
style={[
{
position: "relative",
position: "absolute",
bottom: 0,
left: 0,
right: 0,
@@ -137,6 +138,7 @@ export default function SearchScreen() {
>
<SearchBar onSearchChange={setQuery} />
</Animated.View>
</XStack>
</ScreenLayout>
);
}