Skip to content

Fetch on refresh for play page#18

Open
AndreiCostinOlaru wants to merge 3 commits intomasterfrom
play-feature
Open

Fetch on refresh for play page#18
AndreiCostinOlaru wants to merge 3 commits intomasterfrom
play-feature

Conversation

@AndreiCostinOlaru
Copy link
Copy Markdown
Collaborator

No description provided.

const { title, description, genres, cast, video_source: videoSource } = data;
const { setVideoUrl } = useVideoContext();

const { id, title, description, genres, cast, video_source: videoSource } = data;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need the video_source anymore

return response.data
}

export const useVideoUrl = (id) => useQuery({
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we had a video endpoint, this would be the way. But since we fetch the movie, we could reuse the useMovie hook this time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants