Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch on refresh for play page #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

AndreiCostinOlaru
Copy link
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
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
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