From d89f296e1e2fe315c9ecabdd22e3856fdc1fd6cd Mon Sep 17 00:00:00 2001 From: Avinash Lingaloo <> Date: Mon, 14 Jun 2021 10:20:44 +0400 Subject: [PATCH] Update: Aligning with PR 5452 --- app/screens/sso/index.tsx | 4 ++-- app/screens/sso/sso_with_webview.tsx | 6 +++--- ios/Podfile.lock | 4 ++-- package-lock.json | 18 ++++++++---------- package.json | 2 +- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/app/screens/sso/index.tsx b/app/screens/sso/index.tsx index aa22ba02d1..f810f2b893 100644 --- a/app/screens/sso/index.tsx +++ b/app/screens/sso/index.tsx @@ -1,7 +1,7 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -import React from 'react'; +import React, {useState} from 'react'; import {useIntl} from 'react-intl'; import {Client4} from '@client/rest'; @@ -28,7 +28,7 @@ const SSO = ({config, serverUrl, ssoType, theme}: SSOProps) => { const intl = useIntl(); const managedConfig = useManagedConfig(); - const [loginError, setLoginError] = React.useState(''); + const [loginError, setLoginError] = useState(''); let completeUrlPath = ''; let loginUrl = ''; switch (ssoType) { diff --git a/app/screens/sso/sso_with_webview.tsx b/app/screens/sso/sso_with_webview.tsx index 6be4d13103..f1467299b8 100644 --- a/app/screens/sso/sso_with_webview.tsx +++ b/app/screens/sso/sso_with_webview.tsx @@ -2,7 +2,7 @@ // See LICENSE.txt for license information. import CookieManager, {Cookies} from '@react-native-community/cookies'; -import React from 'react'; +import React, {useEffect} from 'react'; import {useIntl} from 'react-intl'; import {Alert, Text, View} from 'react-native'; import {SafeAreaView} from 'react-native-safe-area-context'; @@ -78,7 +78,7 @@ function SSOWithWebView({completeUrlPath, loginError, loginUrl, onCSRFToken, onM const cookiesTimeout = React.useRef(); const webView = React.useRef(null); - React.useEffect(() => { + useEffect(() => { return () => { if (cookiesTimeout.current) { clearTimeout(cookiesTimeout.current); @@ -192,7 +192,7 @@ function SSOWithWebView({completeUrlPath, loginError, loginUrl, onCSRFToken, onM return (