mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-31 03:28:49 +00:00
StreamingServerWarning wrapped with model suspender
This commit is contained in:
parent
951a8c0fff
commit
268fcd76f2
1 changed files with 8 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ const PropTypes = require('prop-types');
|
|||
const classnames = require('classnames');
|
||||
const Button = require('stremio/common/Button');
|
||||
const useProfile = require('stremio/common/useProfile');
|
||||
const { withModelSuspender } = require('stremio/common/useModelState');
|
||||
const styles = require('./styles');
|
||||
|
||||
const StreamingServerWarning = ({ className }) => {
|
||||
|
|
@ -39,6 +40,12 @@ const StreamingServerWarning = ({ className }) => {
|
|||
}
|
||||
});
|
||||
}, [profile.settings]);
|
||||
|
||||
if (!isNaN(profile.settings.streamingServerWarningDismissed.getTime()) &&
|
||||
profile.settings.streamingServerWarningDismissed.getTime() > Date.now()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classnames(className, styles['warning-container'])}>
|
||||
<div className={styles['warning-statement']}>Streaming server is not available.</div>
|
||||
|
|
@ -56,4 +63,4 @@ StreamingServerWarning.propTypes = {
|
|||
className: PropTypes.string
|
||||
};
|
||||
|
||||
module.exports = StreamingServerWarning;
|
||||
module.exports = withModelSuspender(StreamingServerWarning);
|
||||
|
|
|
|||
Loading…
Reference in a new issue