diff --git a/frontend/src/context/SubscriptionContext/SubscriptionContext.tsx b/frontend/src/context/SubscriptionContext/SubscriptionContext.tsx index 8eb64bc6c..aca2e5328 100644 --- a/frontend/src/context/SubscriptionContext/SubscriptionContext.tsx +++ b/frontend/src/context/SubscriptionContext/SubscriptionContext.tsx @@ -3,8 +3,7 @@ import { createContext, ReactNode, useContext, useMemo } from "react"; import { useGetOrgSubscription } from "@app/hooks/api"; import { SubscriptionPlan } from "@app/hooks/api/types"; -import { useWorkspace } from "../WorkspaceContext"; -// import { Subscription } from '@app/hooks/api/workspace/types'; +import { useOrganization } from "../OrganizationContext"; type TSubscriptionContext = { subscription?: SubscriptionPlan; @@ -18,9 +17,10 @@ type Props = { }; export const SubscriptionProvider = ({ children }: Props): JSX.Element => { - const { currentWorkspace } = useWorkspace(); + const { currentOrg } = useOrganization(); + const { data, isLoading } = useGetOrgSubscription({ - orgID: currentWorkspace?.organization || "" + orgID: currentOrg?._id || "" }); // memorize the workspace details for the context diff --git a/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx b/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx index 20791e0e6..9dd751368 100644 --- a/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx +++ b/frontend/src/views/Settings/BillingSettingsPage/components/BillingCloudTab/PreviewSection.tsx @@ -69,7 +69,7 @@ export const PreviewSection = () => { return (
Unlimited members, projects, RBAC, smart alerts, and so much more
@@ -84,7 +84,7 @@ export const PreviewSection = () => {Current plan