mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-08 04:36:13 +08:00
fix(core): ai subscribe button is not show in ai usage page (#8869)
This commit is contained in:
@@ -31,6 +31,7 @@ export const AIUsagePanel = ({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// revalidate latest subscription status
|
// revalidate latest subscription status
|
||||||
subscriptionService.subscription.revalidate();
|
subscriptionService.subscription.revalidate();
|
||||||
|
subscriptionService.prices.revalidate();
|
||||||
}, [subscriptionService]);
|
}, [subscriptionService]);
|
||||||
const copilotQuotaService = useService(UserCopilotQuotaService);
|
const copilotQuotaService = useService(UserCopilotQuotaService);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
+6
-1
@@ -74,7 +74,12 @@ export const AISubscribe = ({
|
|||||||
onBeforeCheckout={onBeforeCheckout}
|
onBeforeCheckout={onBeforeCheckout}
|
||||||
checkoutOptions={checkoutOptions}
|
checkoutOptions={checkoutOptions}
|
||||||
renderer={props => (
|
renderer={props => (
|
||||||
<Button variant="primary" {...props} {...btnProps}>
|
<Button
|
||||||
|
variant="primary"
|
||||||
|
{...props}
|
||||||
|
{...btnProps}
|
||||||
|
data-testid="ai-subscribe-button"
|
||||||
|
>
|
||||||
{btnProps.children ?? `${priceReadable} / ${priceFrequency}`}
|
{btnProps.children ?? `${priceReadable} / ${priceFrequency}`}
|
||||||
{displayedFrequency === 'monthly' ? (
|
{displayedFrequency === 'monthly' ? (
|
||||||
<span
|
<span
|
||||||
|
|||||||
Reference in New Issue
Block a user