fix: bug
This commit is contained in:
@@ -19,7 +19,6 @@ import { useRouter } from 'expo-router'
|
||||
import { useTemplates, type TemplateDetail } from '@/hooks'
|
||||
import LoadingState from '@/components/LoadingState'
|
||||
import ErrorState from '@/components/ErrorState'
|
||||
import RefreshControl from '@/components/RefreshControl'
|
||||
import PaginationLoader from '@/components/PaginationLoader'
|
||||
|
||||
const { width: screenWidth, height: screenHeight } = Dimensions.get('window')
|
||||
@@ -124,16 +123,13 @@ export default function VideoScreen() {
|
||||
page: 1,
|
||||
limit: PAGE_SIZE,
|
||||
})
|
||||
const [refreshing, setRefreshing] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
execute()
|
||||
}, [execute])
|
||||
|
||||
const handleRefresh = useCallback(async () => {
|
||||
setRefreshing(true)
|
||||
await refetch()
|
||||
setRefreshing(false)
|
||||
}, [refetch])
|
||||
|
||||
const handleLoadMore = useCallback(() => {
|
||||
@@ -220,12 +216,6 @@ export default function VideoScreen() {
|
||||
snapToInterval={videoHeight}
|
||||
snapToAlignment="start"
|
||||
decelerationRate="fast"
|
||||
refreshControl={
|
||||
<RefreshControl
|
||||
refreshing={refreshing}
|
||||
onRefresh={handleRefresh}
|
||||
/>
|
||||
}
|
||||
onEndReached={handleLoadMore}
|
||||
onEndReachedThreshold={0.1}
|
||||
ListFooterComponent={loading ? <PaginationLoader color="#FFE500" /> : null}
|
||||
|
||||
Reference in New Issue
Block a user