1 import { usePlans } from '@proton/account/plans/hooks';
2 import { PLANS } from '@proton/payments';
4 export const useHasPlan = (planName: PLANS) => {
5 const [plansResult] = usePlans();
6 return plansResult?.plans.some(({ Name }) => Name === planName);
9 export const useBundleProPlan = () => {
10 const hasBundlePro2024 = useHasPlan(PLANS.BUNDLE_PRO_2024);
11 return hasBundlePro2024 ? PLANS.BUNDLE_PRO_2024 : PLANS.BUNDLE_PRO;