PromucFlow_constructor/app/client/src/pages/workspace/index.tsx
Sangeeth Sivan ac5997cfe4
chore: code split usage and billing files (#19436)
## Description

Since Usage & Billing is EE only, there are a few components which needs
to be code splitted. So code splitted those files and also added feature
flag for Usage & Billing.

TL;DR Code split usage and billing files

Fixes [#146](https://github.com/appsmithorg/cloud-services/issues/146)

## Type of change

> Please delete options that are not relevant.

- Code splitting


## How Has This Been Tested?

- Manual

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-01-10 11:09:15 +05:30

26 lines
791 B
TypeScript

import React from "react";
import { Switch, useRouteMatch, useLocation, Route } from "react-router-dom";
import PageWrapper from "@appsmith/pages/common/PageWrapper";
import DefaultWorkspacePage from "./defaultWorkspacePage";
import Settings from "./settings";
import * as Sentry from "@sentry/react";
const SentryRoute = Sentry.withSentryRouting(Route);
export function Workspace() {
const { path } = useRouteMatch();
const location = useLocation();
return (
<PageWrapper displayName="Workspace Settings">
<Switch location={location}>
<SentryRoute
component={Settings}
path={`${path}/:workspaceId/settings`}
/>
<SentryRoute component={DefaultWorkspacePage} />
</Switch>
</PageWrapper>
);
}
export default Workspace;