pr_17625.patch 956 B

1234567891011121314151617181920212223
  1. --- services/web/frontend/js/features/source-editor/components/grammarly-advert.tsx
  2. +++ services/web/frontend/js/features/source-editor/components/grammarly-advert.tsx
  3. @@ -6,8 +6,12 @@ import useRemindMeLater from '@/shared/hooks/use-remind-me-later'
  4. import GrammarlyLogo from '@/shared/svgs/grammarly-logo'
  5. import * as eventTracking from '../../../infrastructure/event-tracking'
  6. import useWaitForGrammarlyCheck from '@/shared/hooks/use-wait-for-grammarly-check'
  7. +import getMeta from '@/utils/meta'
  8. +import { ExposedSettings } from '../../../../../types/exposed-settings'
  9. export default function GrammarlyAdvert() {
  10. + const { isOverleaf } = getMeta('ol-ExposedSettings') as ExposedSettings
  11. +
  12. const [show, setShow] = useState(false)
  13. const { t } = useTranslation()
  14. @@ -57,7 +61,7 @@ export default function GrammarlyAdvert() {
  15. remindThemLater()
  16. }, [remindThemLater])
  17. - if (!show) {
  18. + if (!isOverleaf || !show) {
  19. return null
  20. }