mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
fix: correct check for showing streaming server warning
This commit is contained in:
parent
9cbfd15793
commit
a744932949
1 changed files with 5 additions and 6 deletions
|
|
@ -22,11 +22,10 @@ const Board = () => {
|
|||
const profile = useProfile();
|
||||
const boardCatalogsOffset = continueWatchingPreview.items.length > 0 ? 1 : 0;
|
||||
const scrollContainerRef = React.useRef();
|
||||
const streamingServerWarningDismissed = React.useMemo(() => {
|
||||
return streamingServer.settings !== null && streamingServer.settings.type === 'Ready' || (
|
||||
!isNaN(profile.settings.streamingServerWarningDismissed.getTime()) &&
|
||||
profile.settings.streamingServerWarningDismissed.getTime() > Date.now()
|
||||
);
|
||||
const showStreamingServerWarning = React.useMemo(() => {
|
||||
return streamingServer.settings !== null && streamingServer.settings.type === 'Err' && (
|
||||
isNaN(profile.settings.streamingServerWarningDismissed.getTime()) ||
|
||||
profile.settings.streamingServerWarningDismissed.getTime() < Date.now());
|
||||
}, [profile.settings, streamingServer.settings]);
|
||||
const onVisibleRangeChange = React.useCallback(() => {
|
||||
const range = getVisibleChildrenRange(scrollContainerRef.current);
|
||||
|
|
@ -103,7 +102,7 @@ const Board = () => {
|
|||
</div>
|
||||
</MainNavBars>
|
||||
{
|
||||
!streamingServerWarningDismissed ?
|
||||
showStreamingServerWarning ?
|
||||
<StreamingServerWarning className={styles['board-warning-container']} />
|
||||
:
|
||||
null
|
||||
|
|
|
|||
Loading…
Reference in a new issue