Skip to content

Commit

Permalink
fix: adjust ScrollView padding to accommodate safe area insets in Fol…
Browse files Browse the repository at this point in the history
…lowFeed component

Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Jan 16, 2025
1 parent 4217086 commit de3a625
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/mobile/src/modules/feed/FollowFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { router, Stack, useLocalSearchParams, useNavigation } from "expo-router"
import { useState } from "react"
import { Controller, useForm } from "react-hook-form"
import { ScrollView, Text, View } from "react-native"
import { useSafeAreaInsets } from "react-native-safe-area-context"
import { z } from "zod"

import {
Expand Down Expand Up @@ -86,14 +87,19 @@ function FollowImpl() {
}
}

const insets = useSafeAreaInsets()

const { isValid, isDirty } = form.formState

if (!feed?.id) {
return <Text className="text-text">Feed ({id}) not found</Text>
}

return (
<ScrollView contentContainerClassName="px-2 pt-4 gap-y-4">
<ScrollView
contentContainerClassName="px-2 pt-4 gap-y-4"
contentContainerStyle={{ paddingBottom: insets.bottom }}
>
<Stack.Screen
options={{
title: `${isSubscribed ? "Edit" : "Follow"} - ${feed?.title}`,
Expand Down

0 comments on commit de3a625

Please sign in to comment.