This commit is contained in:
Manav Rathi
2024-11-07 15:03:12 +05:30
parent 6f1de7e537
commit 6cc8f2b965

View File

@@ -693,19 +693,14 @@ function ManageSubscription({
closeModal,
setLoading,
}: ManageSubscriptionProps) {
const { setDialogMessage } = useContext(AppContext);
const { onGenericError } = useAppContext();
const openFamilyPortal = async () => {
setLoading(true);
try {
openURL(await getFamilyPortalRedirectURL());
} catch (e) {
log.error("Could not redirect to family portal", e);
setDialogMessage({
title: t("error"),
content: t("generic_error_retry"),
close: { variant: "critical" },
});
onGenericError(e);
}
setLoading(false);
};