movie-web/src/views/Movie.js

21 lines
692 B
JavaScript
Raw Normal View History

2021-07-14 00:31:37 +02:00
import React from 'react'
import { Title } from '../components/Title'
import { Card } from '../components/Card'
import { useMovie } from '../hooks/useMovie'
import { VideoElement } from '../components/VideoElement'
export function MovieView(props) {
const { streamUrl, streamData } = useMovie();
return (
<div className="cardView">
<Card fullWidth>
<Title accent="Return to home" accentLink="search">
2021-07-14 19:03:10 +02:00
{streamData.title} {streamData.type === "show" ? `(${streamData.season}x${streamData.episode})` : '' }
2021-07-14 00:31:37 +02:00
</Title>
<VideoElement streamUrl={streamUrl}/>
</Card>
</div>
)
}