import React from "react"; import { FireCMSLogo } from "@firecms/core"; import { CenteredView, CloseIcon, Container, Dialog, DialogContent, DialogTitle, IconButton, LoadingButton, RocketLaunchIcon, Typography } from "@firecms/ui"; import { UpgradeCloudSubscriptionView } from "./UpgradeCloudSubscriptionView"; import { useProjectConfig, useSubscriptionsForUserController } from "../../hooks"; export function PaywallDialog({ open, trialOver, onClose, }: { open: boolean, trialOver: boolean, onClose: () => void }) { return !open ? onClose() : undefined} > ; } export function Paywall({ trialOver }: { trialOver: boolean }) { const { isGCPMarketplace } = useProjectConfig(); if (isGCPMarketplace) { return Subscription managed via GCP Marketplace Your subscription is managed through Google Cloud Marketplace. Please visit the GCP Console to manage your plan and billing.
}> Manage in GCP Console
; } return {trialOver && Your free trial is over } {!trialOver && Subscribe now } Please create a subscription to continue using the service after your free trial ends, to avoid any service interruptions. If you need help, don't hesitate to reach us at hello@firecms.co , or in our Discord channel.
; } function UpgradeButton() { const { subscriptionPlan, projectId } = useProjectConfig(); if (!subscriptionPlan) throw new Error("No subscription plan"); const { products, } = useSubscriptionsForUserController(); const plusProduct = products?.find(p => p.metadata?.type === "cloud_plus"); if (!plusProduct) { return }> Create a subscription } return }