mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-05-04 22:19:03 +00:00
useMetaDetails adapted to changes in core
This commit is contained in:
parent
208e061f4f
commit
87f1516960
1 changed files with 2 additions and 8 deletions
|
|
@ -14,10 +14,7 @@ const useMetaDetails = (urlParams) => {
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const onNewModel = () => {
|
const onNewModel = () => {
|
||||||
const state = core.getState();
|
const state = core.getState();
|
||||||
const { meta_resource_ref = null, streams_resource_ref = null } = state.meta_details.selected !== null ?
|
const selected = state.meta_details.selected;
|
||||||
state.meta_details.selected
|
|
||||||
:
|
|
||||||
{};
|
|
||||||
const meta_groups = state.meta_details.meta_groups.map((meta_group) => {
|
const meta_groups = state.meta_details.meta_groups.map((meta_group) => {
|
||||||
if (meta_group.content.type === 'Ready') {
|
if (meta_group.content.type === 'Ready') {
|
||||||
meta_group.content.content.released = new Date(meta_group.content.content.released);
|
meta_group.content.content.released = new Date(meta_group.content.content.released);
|
||||||
|
|
@ -37,10 +34,7 @@ const useMetaDetails = (urlParams) => {
|
||||||
});
|
});
|
||||||
const streams_groups = state.meta_details.streams_groups;
|
const streams_groups = state.meta_details.streams_groups;
|
||||||
setMetaDetails({
|
setMetaDetails({
|
||||||
selected: {
|
selected,
|
||||||
meta_resource_ref,
|
|
||||||
streams_resource_ref
|
|
||||||
},
|
|
||||||
meta_groups,
|
meta_groups,
|
||||||
streams_groups
|
streams_groups
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue