From 1d9ba3de6dd95573eafab02997819f0b4c14ea08 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Mon, 31 Mar 2025 16:52:59 +0200 Subject: [PATCH] ui: split services --- frontend/app/Tracker.ts | 3 ++ .../app/components/Client/Billing/Billing.tsx | 3 ++ frontend/app/components/Client/Client.tsx | 11 +++++- .../Header/HealthStatus/HealthStatus.tsx | 2 - .../SaasHeaderMenuItems.tsx | 3 ++ frontend/app/layout/CrispIframe.tsx | 3 ++ frontend/app/layout/SupportModal.tsx | 16 +------- frontend/app/layout/TopRight.tsx | 4 +- frontend/app/routes.ts | 16 +------- frontend/app/services/BillingService.ts | 38 +++++++++++++++++++ frontend/app/services/SignalService.ts | 9 +++++ frontend/app/services/index.ts | 8 ++++ frontend/app/utils/routeUtils.ts | 14 +++++++ 13 files changed, 96 insertions(+), 34 deletions(-) create mode 100644 frontend/app/Tracker.ts create mode 100644 frontend/app/components/Client/Billing/Billing.tsx create mode 100644 frontend/app/components/Header/SaasHeaderMenuItems/SaasHeaderMenuItems.tsx create mode 100644 frontend/app/layout/CrispIframe.tsx create mode 100644 frontend/app/services/BillingService.ts create mode 100644 frontend/app/services/SignalService.ts create mode 100644 frontend/app/utils/routeUtils.ts diff --git a/frontend/app/Tracker.ts b/frontend/app/Tracker.ts new file mode 100644 index 000000000..5c2c71147 --- /dev/null +++ b/frontend/app/Tracker.ts @@ -0,0 +1,3 @@ +export default function Tracker() { + return null; +} diff --git a/frontend/app/components/Client/Billing/Billing.tsx b/frontend/app/components/Client/Billing/Billing.tsx new file mode 100644 index 000000000..576038aff --- /dev/null +++ b/frontend/app/components/Client/Billing/Billing.tsx @@ -0,0 +1,3 @@ +export default function Billing() { + return null; +} \ No newline at end of file diff --git a/frontend/app/components/Client/Client.tsx b/frontend/app/components/Client/Client.tsx index e24cf9f91..f3a714f28 100644 --- a/frontend/app/components/Client/Client.tsx +++ b/frontend/app/components/Client/Client.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { withRouter } from 'react-router-dom'; import { Switch, Route, Redirect } from 'react-router'; -import { CLIENT_TABS, client as clientRoute } from 'App/routes'; +import { client as clientRoute } from 'App/routes'; +import { CLIENT_TABS } from 'App/utils/routeUtils'; import { PANEL_SIZES } from 'App/constants/panelSizes' import SessionsListingSettings from 'Components/Client/SessionsListingSettings'; @@ -10,7 +11,7 @@ import ProfileSettings from './ProfileSettings'; import Integrations from './Integrations'; import UserView from './Users/UsersView'; import AuditView from './Audit/AuditView'; -import Sites from './Sites'; +import Billing from './Billing/Billing'; import Projects from './Projects'; import CustomFields from './CustomFields'; import Webhooks from './Webhooks'; @@ -65,6 +66,12 @@ export default class Client extends React.PureComponent { path={clientRoute(CLIENT_TABS.CUSTOM_FIELDS)} component={CustomFields} /> + - {!!WEBSITE_ID && ( -
-