mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-20 16:50:33 -05:00
refetch home
This commit is contained in:
@@ -9,19 +9,29 @@ import { useHomeContext } from "../provider";
|
||||
import { H3 } from "../../../components/Global/helpers/text";
|
||||
import Avatar from "../../../components/Global/helpers/avatar";
|
||||
import Client from "../../../api/client";
|
||||
import { usePlayerContext } from "@/player/provider";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export function ProvidedHome({ route, navigation }: ProvidedHomeProps): React.JSX.Element {
|
||||
|
||||
const { refreshing: refetching, onRefresh: onRefetch } = useHomeContext()
|
||||
|
||||
const { nowPlayingIsFavorite } = usePlayerContext();
|
||||
|
||||
useEffect(() => {
|
||||
onRefetch()
|
||||
}, [
|
||||
nowPlayingIsFavorite
|
||||
])
|
||||
|
||||
return (
|
||||
<SafeAreaView edges={["top", "right", "left"]}>
|
||||
<ScrollView
|
||||
contentInsetAdjustmentBehavior="automatic"
|
||||
refreshControl={
|
||||
<RefreshControl
|
||||
refreshing={refetching}
|
||||
onRefresh={onRefetch}
|
||||
refreshing={refetching}
|
||||
onRefresh={onRefetch}
|
||||
/>
|
||||
}>
|
||||
<YStack alignContent='flex-start'>
|
||||
|
||||
Reference in New Issue
Block a user