mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-20 03:06:48 +00:00
render Videos/Streams in detail page
This commit is contained in:
parent
6865d41bc6
commit
0b84afc28c
2 changed files with 25 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
const React = require('react');
|
||||
const { NavBar, MetaPreview } = require('stremio/common');
|
||||
const VideosList = require('./VideosList');
|
||||
const StreamsList = require('./StreamsList');
|
||||
const useMetaItem = require('./useMetaItem');
|
||||
const useInLibrary = require('./useInLibrary');
|
||||
require('./styles');
|
||||
|
|
@ -18,6 +20,18 @@ const Detail = ({ urlParams }) => {
|
|||
inLibrary={inLibrary}
|
||||
toggleInLibrary={toggleInLibrary}
|
||||
/>
|
||||
{
|
||||
typeof urlParams.videoId === 'string' && urlParams.videoId.length > 0 ?
|
||||
<StreamsList
|
||||
className={'streams-list'}
|
||||
metaItem={metaItem}
|
||||
/>
|
||||
:
|
||||
<VideosList
|
||||
className={'videos-list'}
|
||||
metaItem={metaItem}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -13,10 +13,19 @@
|
|||
.detail-content {
|
||||
flex: 1;
|
||||
align-self: stretch;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.meta-preview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
.videos-list, .streams-list {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
flex-basis: 30rem;
|
||||
align-self: stretch;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue