|
1 | | -import { ArrowUpCircleIcon } from "@heroicons/react/20/solid"; |
2 | | -import { Feedback } from "~/components/Feedback"; |
3 | | -import { Button, LinkButton } from "~/components/primitives/Buttons"; |
4 | 1 | import { Header3 } from "~/components/primitives/Headers"; |
5 | 2 | import { InfoIconTooltip, SimpleTooltip } from "~/components/primitives/Tooltip"; |
6 | 3 | import { useOrganization } from "~/hooks/useOrganizations"; |
7 | | -import { v3BillingPath, v3SchedulesAddOnPath } from "~/utils/pathBuilder"; |
8 | | -import { |
9 | | - PurchaseSchedulesModal, |
10 | | - type SchedulePricing, |
11 | | -} from "./PurchaseSchedulesModal"; |
| 4 | +import { v3SchedulesAddOnPath } from "~/utils/pathBuilder"; |
| 5 | +import { ScheduleLimitActions } from "./ScheduleLimitActions"; |
| 6 | +import { type SchedulePricing } from "./PurchaseSchedulesModal"; |
12 | 7 |
|
13 | 8 | type Props = { |
14 | 9 | limits: { used: number; limit: number }; |
@@ -81,30 +76,17 @@ export function SchedulesUsageBar({ |
81 | 76 | </div> |
82 | 77 | )} |
83 | 78 |
|
84 | | - {canPurchaseSchedules && schedulePricing ? ( |
85 | | - <PurchaseSchedulesModal |
86 | | - actionPath={actionPath} |
87 | | - schedulePricing={schedulePricing} |
88 | | - extraSchedules={extraSchedules} |
89 | | - usedSchedules={limits.used} |
90 | | - maxQuota={maxScheduleQuota} |
91 | | - planScheduleLimit={planScheduleLimit} |
92 | | - /> |
93 | | - ) : canUpgrade ? ( |
94 | | - <LinkButton |
95 | | - to={v3BillingPath(organization)} |
96 | | - variant="secondary/small" |
97 | | - LeadingIcon={ArrowUpCircleIcon} |
98 | | - leadingIconClassName="text-indigo-500" |
99 | | - > |
100 | | - Upgrade |
101 | | - </LinkButton> |
102 | | - ) : ( |
103 | | - <Feedback |
104 | | - button={<Button variant="secondary/small">Request more</Button>} |
105 | | - defaultValue="help" |
106 | | - /> |
107 | | - )} |
| 79 | + <ScheduleLimitActions |
| 80 | + actionPath={actionPath} |
| 81 | + canPurchaseSchedules={canPurchaseSchedules} |
| 82 | + schedulePricing={schedulePricing} |
| 83 | + extraSchedules={extraSchedules} |
| 84 | + limits={limits} |
| 85 | + maxScheduleQuota={maxScheduleQuota} |
| 86 | + planScheduleLimit={planScheduleLimit} |
| 87 | + canUpgrade={canUpgrade} |
| 88 | + organization={organization} |
| 89 | + /> |
108 | 90 | </div> |
109 | 91 | </div> |
110 | 92 | </div> |
|
0 commit comments