mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-05-03 08:49:26 +00:00
22 lines
581 B
JavaScript
22 lines
581 B
JavaScript
// Copyright (C) 2017-2023 Smart code 203358507
|
|
|
|
const useModelState = require('stremio/common/useModelState');
|
|
|
|
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 = () => {
|
|
return useModelState({ model: 'ctx', map });
|
|
};
|
|
|
|
module.exports = useProfile;
|