import { useSearchParameter, useUser } from '@rocket.chat/ui-contexts'; import RegistrationPageRouter from '@rocket.chat/web-ui-registration'; import { getErrorMessage } from '../../lib/errorHandling'; import PageLoading from '../root/PageLoading'; import AuthorizationFormPage from './components/AuthorizationFormPage'; import ErrorPage from './components/ErrorPage'; import { useOAuthAppQuery } from './hooks/useOAuthAppQuery'; const OAuthAuthorizationPage = () => { const user = useUser(); const clientId = useSearchParameter('client_id'); const redirectUri = useSearchParameter('redirect_uri'); const oauthAppQuery = useOAuthAppQuery(clientId, { enabled: !!user, }); if (!user) { return ; } if (oauthAppQuery.isPending) { return ; } if (oauthAppQuery.isError) { return ; } return ; }; export default OAuthAuthorizationPage;