1 import { useSubscription } from '@proton/account/subscription/hooks';
2 import { isFreeSubscription } from '@proton/payments';
4 const useMozillaCheck = (): [isManagedByMozilla: boolean, loading: boolean] => {
5 const [subscription, loading] = useSubscription();
7 let isManagedByMozilla = false;
8 if (!loading && !isFreeSubscription(subscription)) {
9 isManagedByMozilla = !!subscription?.isManagedByMozilla;
12 return [isManagedByMozilla, loading];
15 export default useMozillaCheck;