From 3bd6c444133a717a8de1e109029f10007df13fc6 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 30 Apr 2024 17:40:37 -0400 Subject: [PATCH] MM-53148 Fix an incorrect type (#26920) --- webapp/channels/src/components/desktop_auth_token.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/webapp/channels/src/components/desktop_auth_token.tsx b/webapp/channels/src/components/desktop_auth_token.tsx index 1643fe522e..b3f549b1df 100644 --- a/webapp/channels/src/components/desktop_auth_token.tsx +++ b/webapp/channels/src/components/desktop_auth_token.tsx @@ -8,8 +8,6 @@ import {FormattedMessage} from 'react-intl'; import {useDispatch} from 'react-redux'; import {useHistory, useLocation} from 'react-router-dom'; -import type {UserProfile} from '@mattermost/types/users'; - import {loginWithDesktopToken} from 'actions/views/login'; import DesktopApp from 'utils/desktop_api'; @@ -29,7 +27,7 @@ enum DesktopAuthStatus { type Props = { href: string; - onLogin: (userProfile: UserProfile) => void; + onLogin: () => void; } const DesktopAuthToken: React.FC = ({href, onLogin}: Props) => { @@ -51,7 +49,7 @@ const DesktopAuthToken: React.FC = ({href, onLogin}: Props) => { } sessionStorage.removeItem(DESKTOP_AUTH_PREFIX); - const {data: userProfile, error: loginError} = await dispatch(loginWithDesktopToken(serverToken)); + const {error: loginError} = await dispatch(loginWithDesktopToken(serverToken)); if (loginError && loginError.server_error_id && loginError.server_error_id.length !== 0) { setStatus(DesktopAuthStatus.Error); @@ -59,7 +57,7 @@ const DesktopAuthToken: React.FC = ({href, onLogin}: Props) => { } setStatus(DesktopAuthStatus.LoggedIn); - await onLogin(userProfile as UserProfile); + await onLogin(); }; const openExternalLoginURL = async () => {