diff --git a/web/app/components/billing/billing-page/index.tsx b/web/app/components/billing/billing-page/index.tsx index 880800274f..a079bf2cb1 100644 --- a/web/app/components/billing/billing-page/index.tsx +++ b/web/app/components/billing/billing-page/index.tsx @@ -11,23 +11,23 @@ import { useProviderContext } from '@/context/provider-context' const Billing: FC = () => { const { t } = useTranslation() - const { isCurrentWorkspaceManager } = useAppContext() + const { isCurrentWorkspaceOwner } = useAppContext() const [billingUrl, setBillingUrl] = React.useState('') const { enableBilling } = useProviderContext() useEffect(() => { - if (!enableBilling && !isCurrentWorkspaceManager) + if (!enableBilling || !isCurrentWorkspaceOwner) return (async () => { const { url } = await fetchBillingUrl() setBillingUrl(url) })() - }, [isCurrentWorkspaceManager]) + }, [isCurrentWorkspaceOwner]) return (