diff --git a/src/blocks/GithubStarsBlock/GithubStarsBlock.scss b/src/blocks/GithubStarsBlock/GithubStarsBlock.scss index d2b33be26563..9bfe96a55bbc 100644 --- a/src/blocks/GithubStarsBlock/GithubStarsBlock.scss +++ b/src/blocks/GithubStarsBlock/GithubStarsBlock.scss @@ -26,9 +26,6 @@ $block: '.#{variables.$ns}github-stars-promotion'; animation-delay: 500ms; } - @media (max-width: map-get(pcVariables.$gridBreakpoints, 'sm') - 1) { - } - &__wrapper { display: flex; justify-content: flex-end; diff --git a/src/blocks/GithubStarsBlock/GithubStarsBlock.tsx b/src/blocks/GithubStarsBlock/GithubStarsBlock.tsx index a3eb9cf0ab69..906ee4fa819f 100644 --- a/src/blocks/GithubStarsBlock/GithubStarsBlock.tsx +++ b/src/blocks/GithubStarsBlock/GithubStarsBlock.tsx @@ -2,6 +2,7 @@ import {Star} from '@gravity-ui/icons'; import {Animatable, HTML} from '@gravity-ui/page-constructor'; import {Button, Icon, Text} from '@gravity-ui/uikit'; import {useTranslation} from 'next-i18next'; +import {useRouter} from 'next/router'; import React, {useEffect, useState} from 'react'; import {GITHUB_UI_KIT_URL} from 'src/constants'; @@ -23,6 +24,7 @@ export type GithubStarsModel = GithubStarsBlockProps & { export const GithubStarsBlock: React.FC = ({device}) => { const {t} = useTranslation(); + const {pathname} = useRouter(); const [hide, setHide] = useState(true); useEffect(() => { @@ -33,6 +35,10 @@ export const GithubStarsBlock: React.FC = ({device}) => { localStorage.setItem(LOCAL_STORAGE_KEY, 'true'); }; + if (pathname !== '/') { + return null; + } + return (