Skip to content

Commit c89d7ea

Browse files
committed
chore(ui-client): move Setup Wizard view
1 parent f4b2907 commit c89d7ea

40 files changed

+219
-39
lines changed

apps/meteor/client/components/PlanTag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Box, Tag } from '@rocket.chat/fuselage';
2+
import { useLicense } from '@rocket.chat/ui-client';
23

34
import { isTruthy } from '../../lib/isTruthy';
4-
import { useLicense } from '../hooks/useLicense';
55

66
const developmentTag = process.env.NODE_ENV === 'development' ? 'Development' : null;
77
function PlanTag() {

apps/meteor/client/hooks/useHasLicenseModule.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { LicenseModule } from '@rocket.chat/core-typings';
2-
3-
import { useLicenseBase } from './useLicense';
2+
import { useLicenseBase } from '@rocket.chat/ui-client';
43

54
export const useHasLicenseModule = (licenseName: LicenseModule | undefined) =>
65
useLicenseBase({
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import { useLicenseBase } from '@rocket.chat/ui-client';
12
import type { UseQueryResult } from '@tanstack/react-query';
23

3-
import { useLicenseBase } from './useLicense';
4-
54
export const useIsEnterprise = (): UseQueryResult<{ isEnterprise: boolean }> => {
65
return useLicenseBase({ select: (data) => ({ isEnterprise: Boolean(data?.license.license) }) });
76
};

apps/meteor/client/hooks/useLicenseLimitsByBehavior.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { LicenseBehavior, LicenseLimitKind } from '@rocket.chat/core-typings';
22
import { validateWarnLimit } from '@rocket.chat/license/src/validation/validateLimit';
3-
4-
import { useLicense } from './useLicense';
3+
import { useLicense } from '@rocket.chat/ui-client';
54

65
type LicenseLimitsByBehavior = Record<LicenseBehavior, LicenseLimitKind[]>;
76

apps/meteor/client/hooks/useShouldPreventAction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { LicenseLimitKind } from '@rocket.chat/core-typings';
2-
3-
import { useLicense } from './useLicense';
2+
import { useLicense } from '@rocket.chat/ui-client';
43

54
export const useShouldPreventAction = (action: LicenseLimitKind): boolean => {
65
const { data: { preventedActions } = {} } = useLicense();

apps/meteor/client/providers/AppsProvider/AppsProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useDebouncedCallback } from '@rocket.chat/fuselage-hooks';
2+
import { useInvalidateLicense, useLicense } from '@rocket.chat/ui-client';
23
import { usePermission, useStream } from '@rocket.chat/ui-contexts';
34
import { keepPreviousData, useQuery, useQueryClient } from '@tanstack/react-query';
45
import type { ReactNode } from 'react';
@@ -7,7 +8,6 @@ import { useEffect } from 'react';
78
import { storeQueryFunction } from './storeQueryFunction';
89
import { AppClientOrchestratorInstance } from '../../apps/orchestrator';
910
import { AppsContext } from '../../contexts/AppsContext';
10-
import { useInvalidateLicense, useLicense } from '../../hooks/useLicense';
1111
import type { AsyncState } from '../../lib/asyncState';
1212
import { AsyncStatePhase } from '../../lib/asyncState';
1313
import { useInvalidateAppsCountQueryCallback } from '../../views/marketplace/hooks/useAppsCountQuery';

apps/meteor/client/sidebar/footer/SidebarFooterWatermark.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Box } from '@rocket.chat/fuselage';
2+
import { useLicense, useLicenseName } from '@rocket.chat/ui-client';
23
import type { ReactElement } from 'react';
34
import { useTranslation } from 'react-i18next';
45

5-
import { useLicense, useLicenseName } from '../../hooks/useLicense';
66
import { links } from '../../lib/links';
77

88
export const SidebarFooterWatermark = (): ReactElement | null => {

apps/meteor/client/sidebarv2/footer/SidebarFooterWatermark.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Box } from '@rocket.chat/fuselage';
2+
import { useLicense, useLicenseName } from '@rocket.chat/ui-client';
23
import type { ReactElement } from 'react';
34
import { useTranslation } from 'react-i18next';
45

5-
import { useLicense, useLicenseName } from '../../hooks/useLicense';
66
import { links } from '../../lib/links';
77

88
export const SidebarFooterWatermark = (): ReactElement | null => {

apps/meteor/client/startup/routes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { SetupWizardRoute } from '@rocket.chat/ui-client';
12
import { createElement, lazy, useEffect } from 'react';
23

34
import { appLayout } from '../lib/appLayout';
@@ -14,7 +15,6 @@ const CMSPage = lazy(() => import('@rocket.chat/web-ui-registration').then(({ CM
1415
const SecretURLPage = lazy(() => import('../views/invite/SecretURLPage'));
1516
const InvitePage = lazy(() => import('../views/invite/InvitePage'));
1617
const ConferenceRoute = lazy(() => import('../views/conference/ConferenceRoute'));
17-
const SetupWizardRoute = lazy(() => import('../views/setupWizard/SetupWizardRoute'));
1818
const MailerUnsubscriptionPage = lazy(() => import('../views/mailer/MailerUnsubscriptionPage'));
1919
const LoginTokenRoute = lazy(() => import('../views/root/LoginTokenRoute'));
2020
const SAMLLoginRoute = lazy(() => import('../views/root/SAMLLoginRoute'));

apps/meteor/client/views/admin/settings/hooks/useHasSettingModule.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import type { ISetting, LicenseModule } from '@rocket.chat/core-typings';
2+
import { useLicenseBase } from '@rocket.chat/ui-client';
23
import { useMemo } from 'react';
34

4-
import { useLicenseBase } from '../../../../hooks/useLicense';
5-
65
export const useHasSettingModule = (setting?: ISetting) => {
76
const { data } = useLicenseBase({
87
select: (data) => ({ isEnterprise: Boolean(data?.license.license), activeModules: data?.license.activeModules }),

0 commit comments

Comments
 (0)