mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-30 14:58:52 +00:00
useProfile map func modified
This commit is contained in:
parent
3375102d40
commit
76042a5893
1 changed files with 12 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue