- {getApiCurl(method, api).map((curlAddress) => (
- <>
+ {getApiCurl(method, api).map((curlAddress, index) => (
+
{curlAddress}
- >
+
))}
diff --git a/client/views/admin/apps/types.ts b/client/views/admin/apps/types.ts
index 5e413979d95b..3942395edb4f 100644
--- a/client/views/admin/apps/types.ts
+++ b/client/views/admin/apps/types.ts
@@ -15,7 +15,7 @@ export type App = {
price: number;
purchaseType: string;
pricingPlans: unknown[];
- iconFileContent: unknown;
+ iconFileContent: string;
installed?: boolean;
isEnterpriseOnly?: boolean;
bundledIn: {
diff --git a/client/views/admin/cloud/CloudPage.js b/client/views/admin/cloud/CloudPage.tsx
similarity index 69%
rename from client/views/admin/cloud/CloudPage.js
rename to client/views/admin/cloud/CloudPage.tsx
index 5a1c92fac088..b99b8a87917f 100644
--- a/client/views/admin/cloud/CloudPage.js
+++ b/client/views/admin/cloud/CloudPage.tsx
@@ -1,6 +1,5 @@
import { Box, Button, ButtonGroup, Margins } from '@rocket.chat/fuselage';
-import { useMutableCallback, useSafely } from '@rocket.chat/fuselage-hooks';
-import React, { useState, useEffect } from 'react';
+import React, { useEffect, ReactNode } from 'react';
import Page from '../../../components/Page';
import { useSetModal } from '../../../contexts/ModalContext';
@@ -8,6 +7,7 @@ import { useQueryStringParameter, useRoute, useRouteParameter } from '../../../c
import { useMethod } from '../../../contexts/ServerContext';
import { useToastMessageDispatch } from '../../../contexts/ToastMessagesContext';
import { useTranslation } from '../../../contexts/TranslationContext';
+import { useMethodData } from '../../../hooks/useMethodData';
import ConnectToCloudSection from './ConnectToCloudSection';
import ManualWorkspaceRegistrationModal from './ManualWorkspaceRegistrationModal';
import TroubleshootingSection from './TroubleshootingSection';
@@ -16,7 +16,9 @@ import WorkspaceLoginSection from './WorkspaceLoginSection';
import WorkspaceRegistrationSection from './WorkspaceRegistrationSection';
import { cloudConsoleUrl } from './constants';
-function CloudPage() {
+const args: [] = [];
+
+const CloudPage = function CloudPage(): ReactNode {
const t = useTranslation();
const dispatchToastMessage = useToastMessageDispatch();
@@ -30,11 +32,17 @@ function CloudPage() {
const token = useQueryStringParameter('token');
const finishOAuthAuthorization = useMethod('cloud:finishOAuthAuthorization');
- const checkRegisterStatus = useMethod('cloud:checkRegisterStatus');
+
+ const { reload, ...checkRegisterStatus } = useMethodData('cloud:checkRegisterStatus', args);
+
+ useEffect(() => {
+ console.log('checkRegisterStatus', checkRegisterStatus);
+ }, [checkRegisterStatus]);
+
const connectWorkspace = useMethod('cloud:connectWorkspace');
useEffect(() => {
- const acceptOAuthAuthorization = async () => {
+ const acceptOAuthAuthorization = async (): Promise