Commit 0f99395 1 parent 2f8df1a commit 0f99395 Copy full SHA for 0f99395
File tree 2 files changed +15
-7
lines changed
packages/firecms_cloud/src
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,7 @@ import {
23
23
useBuildLocalConfigurationPersistence ,
24
24
useBuildModeController ,
25
25
useBuildNavigationController ,
26
- User ,
27
- useSnackbarController
26
+ User
28
27
} from "@firecms/core" ;
29
28
import { buildCollectionInference , useFirestoreCollectionsConfigController } from "@firecms/collection_editor_firebase" ;
30
29
import {
@@ -508,8 +507,6 @@ function FireCMSAppAuthenticated({
508
507
throw Error ( "You can only use FireCMSAppAuthenticated with an authenticated user" ) ;
509
508
}
510
509
511
- const snackbarController = useSnackbarController ( ) ;
512
-
513
510
const includeDataTalk = userManagement . isAdmin ?? false ;
514
511
const dataTalkPath = useDataTalkMode ( ) ;
515
512
const dataTalkMode = includeDataTalk && dataTalkPath ;
@@ -579,11 +576,11 @@ function FireCMSAppAuthenticated({
579
576
basePath,
580
577
baseCollectionPath,
581
578
authController,
582
- collections : appConfig ?. collections ,
579
+ collections : projectConfig . isTrialOver ? [ ] : appConfig ?. collections ,
583
580
views : appConfig ?. views ,
584
581
userConfigPersistence,
585
582
dataSourceDelegate : firestoreDelegate ,
586
- injectCollections : useCallback (
583
+ injectCollections : projectConfig . isTrialOver ? undefined : useCallback (
587
584
( collections : EntityCollection [ ] ) => mergeCollections (
588
585
collections ,
589
586
collectionConfigController . collections ?? [ ] ,
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ import {
7
7
useCustomizationController ,
8
8
useNavigationController
9
9
} from "@firecms/core" ;
10
- import { SubscriptionPlanWidget } from "./subscriptions" ;
10
+ import { Paywall , SubscriptionPlanWidget } from "./subscriptions" ;
11
11
import { ADMIN_VIEWS_CONFIG } from "../utils" ;
12
+ import { useProjectConfig } from "../hooks" ;
13
+ import { CenteredView } from "@firecms/ui" ;
12
14
13
15
/**
14
16
* Default entry view for the CMS under the path "/"
@@ -21,6 +23,9 @@ export function FireCMSCloudHomePage() {
21
23
22
24
const navigation = useNavigationController ( ) ;
23
25
const { plugins } = useCustomizationController ( ) ;
26
+ const {
27
+ isTrialOver,
28
+ } = useProjectConfig ( ) ;
24
29
25
30
const pluginActions : React . ReactNode [ ] = [ ] ;
26
31
if ( plugins ) {
@@ -29,6 +34,12 @@ export function FireCMSCloudHomePage() {
29
34
) ) . filter ( Boolean ) ) ;
30
35
}
31
36
const showSubscriptionWidget = ( navigation . collections ?? [ ] ) . length > 0 ;
37
+
38
+ if ( isTrialOver ) {
39
+ return < CenteredView >
40
+ < Paywall trialOver = { isTrialOver } />
41
+ </ CenteredView > ;
42
+ }
32
43
return < DefaultHomePage
33
44
additionalActions = { < > { pluginActions } </ > }
34
45
additionalChildrenStart = { showSubscriptionWidget
You can’t perform that action at this time.
0 commit comments