chore: fix ui

This commit is contained in:
phamhieu authored and Hieu Pham committed 2022-02-17 11:26:39 +07:00
1 parent a505942603
commit fdf827d0a9
1 file changed
+9 -5
+9 -5
View File
@@ -106,7 +106,9 @@ export const Wizard = observer(() => {
const isSelectFreeTier = dbPricingPlan === PRICING_PLANS.FREE
const canCreateProject =
currentOrg?.is_owner && (!isSelectFreeTier || (isSelectFreeTier && !isOverFreeProjectLimit))
currentOrg?.is_owner &&
subscriptionStats != undefined &&
(!isSelectFreeTier || (isSelectFreeTier && !isOverFreeProjectLimit))
const canSubmit =
projectName != '' &&
@@ -345,7 +347,9 @@ export const Wizard = observer(() => {
))}
</Listbox>
{isSelectFreeTier && isOverFreeProjectLimit && <FreeProjectLimitWarning />}
{isSelectFreeTier && isOverFreeProjectLimit && (
<FreeProjectLimitWarning limit={freeProjectsLimit} />
)}
{!isSelectFreeTier && isEmptyPaymentMethod && (
<EmptyPaymentMethodWarning stripeCustomerId={stripeCustomerId} />
)}
@@ -379,7 +383,7 @@ const NotOrganizationOwnerWarning = () => {
)
}
const FreeProjectLimitWarning = () => {
const FreeProjectLimitWarning = ({ limit }: { limit: number }) => {
return (
<div className="mt-4">
<InformationBox
@@ -391,8 +395,8 @@ const FreeProjectLimitWarning = () => {
description={
<div className="space-y-3">
<p className="text-sm leading-normal">
Your account can only have a maximum of 2 free projects. You can only choose paid
pricing plan.
{`Your account can only have a maximum of ${limit} free projects. You can only choose paid
pricing plan.`}
</p>
</div>
}