mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-17 08:29:54 +00:00
fix(Player): hide update banner on player screen
This commit is contained in:
parent
c5adb82399
commit
3b2bf516c2
1 changed files with 3 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import React, { useEffect } from 'react';
|
||||
import Icon from '@stremio/stremio-icons/react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useMatch } from 'react-router';
|
||||
import { useBinaryState, usePlatform } from 'stremio/common';
|
||||
import { Button, Transition } from 'stremio/components';
|
||||
import styles from './UpdaterBanner.less';
|
||||
|
|
@ -13,6 +14,7 @@ const UpdaterBanner = ({ className }: Props) => {
|
|||
const { t } = useTranslation();
|
||||
const { shell } = usePlatform();
|
||||
const [visible, show, hide] = useBinaryState(false);
|
||||
const isPlayer = useMatch('/player/:stream/*');
|
||||
|
||||
const onInstallClick = () => {
|
||||
shell.send('autoupdater-notif-clicked');
|
||||
|
|
@ -28,7 +30,7 @@ const UpdaterBanner = ({ className }: Props) => {
|
|||
|
||||
return (
|
||||
<div className={className}>
|
||||
<Transition when={visible} name={'slide-up'}>
|
||||
<Transition when={visible && !isPlayer} name={'slide-up'}>
|
||||
<div className={styles['updater-banner']}>
|
||||
<div className={styles['label']}>
|
||||
{ t('UPDATER_TITLE') }
|
||||
|
|
|
|||
Loading…
Reference in a new issue