useProfile map func modified

This commit is contained in:
svetlagasheva 2021-08-05 13:11:58 +03:00
parent 3375102d40
commit 76042a5893

View file

@ -4,7 +4,18 @@ const React = require('react');
const { useServices } = require('stremio/services');
const useModelState = require('stremio/common/useModelState');
const map = (ctx) => ctx.profile;
const map = (ctx) => ({
...ctx.profile,
settings: {
...ctx.profile.settings,
streamingServerWarningDismissed: new Date(
typeof ctx.profile.settings.streamingServerWarningDismissed === 'string' ?
ctx.profile.settings.streamingServerWarningDismissed
:
NaN
)
}
});
const useProfile = () => {
const { core } = useServices();