-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 7417-workflows-i-can-send-emails-using-the-e…
…mail-account
- Loading branch information
Showing
54 changed files
with
897 additions
and
468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
packages/twenty-front/src/effect-components/GotoHotkeysEffect.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,13 @@ | ||
import ReactDOM from 'react-dom/client'; | ||
import { HelmetProvider } from 'react-helmet-async'; | ||
import { RecoilRoot } from 'recoil'; | ||
import { IconsProvider } from 'twenty-ui'; | ||
|
||
import { CaptchaProvider } from '@/captcha/components/CaptchaProvider'; | ||
import { ApolloDevLogEffect } from '@/debug/components/ApolloDevLogEffect'; | ||
import { RecoilDebugObserverEffect } from '@/debug/components/RecoilDebugObserver'; | ||
import { AppErrorBoundary } from '@/error-handler/components/AppErrorBoundary'; | ||
import { ExceptionHandlerProvider } from '@/error-handler/components/ExceptionHandlerProvider'; | ||
import { SnackBarProviderScope } from '@/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope'; | ||
|
||
import '@emotion/react'; | ||
|
||
import { App } from './App'; | ||
|
||
import './index.css'; | ||
import { App } from '@/app/components/App'; | ||
import 'react-loading-skeleton/dist/skeleton.css'; | ||
import './index.css'; | ||
|
||
const root = ReactDOM.createRoot( | ||
document.getElementById('root') ?? document.body, | ||
); | ||
|
||
root.render( | ||
<RecoilRoot> | ||
<AppErrorBoundary> | ||
<CaptchaProvider> | ||
<RecoilDebugObserverEffect /> | ||
<ApolloDevLogEffect /> | ||
<SnackBarProviderScope snackBarManagerScopeId="snack-bar-manager"> | ||
<IconsProvider> | ||
<ExceptionHandlerProvider> | ||
<HelmetProvider> | ||
<App /> | ||
</HelmetProvider> | ||
</ExceptionHandlerProvider> | ||
</IconsProvider> | ||
</SnackBarProviderScope> | ||
</CaptchaProvider> | ||
</AppErrorBoundary> | ||
</RecoilRoot>, | ||
); | ||
root.render(<App />); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { AppRouter } from '@/app/components/AppRouter'; | ||
import { CaptchaProvider } from '@/captcha/components/CaptchaProvider'; | ||
import { ApolloDevLogEffect } from '@/debug/components/ApolloDevLogEffect'; | ||
import { RecoilDebugObserverEffect } from '@/debug/components/RecoilDebugObserver'; | ||
import { AppErrorBoundary } from '@/error-handler/components/AppErrorBoundary'; | ||
import { ExceptionHandlerProvider } from '@/error-handler/components/ExceptionHandlerProvider'; | ||
import { SnackBarProviderScope } from '@/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope'; | ||
import { HelmetProvider } from 'react-helmet-async'; | ||
import { RecoilRoot } from 'recoil'; | ||
import { IconsProvider } from 'twenty-ui'; | ||
|
||
export const App = () => { | ||
return ( | ||
<RecoilRoot> | ||
<AppErrorBoundary> | ||
<CaptchaProvider> | ||
<RecoilDebugObserverEffect /> | ||
<ApolloDevLogEffect /> | ||
<SnackBarProviderScope snackBarManagerScopeId="snack-bar-manager"> | ||
<IconsProvider> | ||
<ExceptionHandlerProvider> | ||
<HelmetProvider> | ||
<AppRouter /> | ||
</HelmetProvider> | ||
</ExceptionHandlerProvider> | ||
</IconsProvider> | ||
</SnackBarProviderScope> | ||
</CaptchaProvider> | ||
</AppErrorBoundary> | ||
</RecoilRoot> | ||
); | ||
}; |
27 changes: 27 additions & 0 deletions
27
packages/twenty-front/src/modules/app/components/AppRouter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { createAppRouter } from '@/app/utils/createAppRouter'; | ||
import { billingState } from '@/client-config/states/billingState'; | ||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled'; | ||
import { RouterProvider } from 'react-router-dom'; | ||
import { useRecoilValue } from 'recoil'; | ||
|
||
export const AppRouter = () => { | ||
const billing = useRecoilValue(billingState); | ||
const isFreeAccessEnabled = useIsFeatureEnabled('IS_FREE_ACCESS_ENABLED'); | ||
const isCRMMigrationEnabled = useIsFeatureEnabled('IS_CRM_MIGRATION_ENABLED'); | ||
const isServerlessFunctionSettingsEnabled = useIsFeatureEnabled( | ||
'IS_FUNCTION_SETTINGS_ENABLED', | ||
); | ||
|
||
const isBillingPageEnabled = | ||
billing?.isBillingEnabled && !isFreeAccessEnabled; | ||
|
||
return ( | ||
<RouterProvider | ||
router={createAppRouter( | ||
isBillingPageEnabled, | ||
isCRMMigrationEnabled, | ||
isServerlessFunctionSettingsEnabled, | ||
)} | ||
/> | ||
); | ||
}; |
Oops, something went wrong.