From 81f38b01049119d72d2e81be8f1b4aea6b1d3b17 Mon Sep 17 00:00:00 2001 From: Klajdi Paja Date: Sat, 26 Oct 2024 19:42:04 +0200 Subject: [PATCH] fix lint and tsc errors --- src/pages/signin/SignInPageLayout/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/signin/SignInPageLayout/index.tsx b/src/pages/signin/SignInPageLayout/index.tsx index 0f754075b845..3517edf9b847 100644 --- a/src/pages/signin/SignInPageLayout/index.tsx +++ b/src/pages/signin/SignInPageLayout/index.tsx @@ -2,7 +2,7 @@ import type {ForwardedRef} from 'react'; import React, {forwardRef, useEffect, useImperativeHandle, useMemo, useRef} from 'react'; // eslint-disable-next-line no-restricted-imports import type {ScrollView as RNScrollView} from 'react-native'; -import {Platform, View} from 'react-native'; +import {View} from 'react-native'; import SignInGradient from '@assets/images/home-fade-gradient.svg'; import ImageSVG from '@components/ImageSVG'; import ScrollView from '@components/ScrollView'; @@ -94,9 +94,12 @@ function SignInPageLayout( DomUtils.addCSS(DomUtils.getAutofilledInputStyle(themes[CONST.THEME.DARK].text, `.${cssClass}`), 'sign-in-autofill-input'); useEffect(() => { - if (![CONST.PLATFORM.WEB, CONST.PLATFORM.DESKTOP].includes(getPlatform())) { + const isWeb = getPlatform() === CONST.PLATFORM.WEB; + const isDesktop = getPlatform() === CONST.PLATFORM.DESKTOP; + if (!isWeb && !isDesktop) { return; } + // add css class to body only for web and desktop document.body.classList.add(cssClass); return () => { document.body.classList.remove(cssClass);