From ba763a85cd889acf1dc49ff8f9843e376b3a01ed Mon Sep 17 00:00:00 2001 From: btzr-io Date: Fri, 16 Jul 2021 02:22:54 -0500 Subject: [PATCH] remove react-helmet --- package.json | 1 - ui/component/app/view.jsx | 9 +++++---- yarn.lock | 25 +++---------------------- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 6411cb3e4..51ccb5214 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "feed": "^4.2.2", "if-env": "^1.0.4", "react-datetime-picker": "^3.2.1", - "react-helmet": "^6.1.0", "react-top-loading-bar": "^2.0.1", "remove-markdown": "^0.3.0", "source-map-explorer": "^2.5.2", diff --git a/ui/component/app/view.jsx b/ui/component/app/view.jsx index dd4edbb36..d260fd053 100644 --- a/ui/component/app/view.jsx +++ b/ui/component/app/view.jsx @@ -4,7 +4,6 @@ import React, { useEffect, useRef, useState, useLayoutEffect } from 'react'; import { lazyImport } from 'util/lazyImport'; import classnames from 'classnames'; import analytics from 'analytics'; -import { Helmet } from 'react-helmet'; import { buildURI, parseURI } from 'lbry-redux'; import { SIMPLE_SITE } from 'config'; import Router from 'component/router/index'; @@ -284,6 +283,11 @@ function App(props: Props) { } }, [hasMyChannels, hasNoChannels, hasActiveChannelClaim, setActiveChannelIfNotSet, setIncognito]); + useEffect(() => { + // $FlowFixMe + document.documentElement.setAttribute('lang', language); + }, [language]); + useEffect(() => { if (!languages.includes(language)) { setLanguage(language); @@ -416,9 +420,6 @@ function App(props: Props) { ref={appRef} onContextMenu={IS_WEB ? undefined : (e) => openContextMenu(e)} > - {/* Define main language */} - - {IS_WEB && lbryTvApiStatus === STATUS_DOWN ? (