From bdf70e76e09471c70f95f42be75d6d0f352289c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Tue, 22 Mar 2022 13:47:29 +0100 Subject: [PATCH] feat(dashboard-v2): expose loading flag from useActivePlan hook --- packages/dashboard-v2/src/hooks/useActivePlan.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/dashboard-v2/src/hooks/useActivePlan.js b/packages/dashboard-v2/src/hooks/useActivePlan.js index 53e28b63..de71a036 100644 --- a/packages/dashboard-v2/src/hooks/useActivePlan.js +++ b/packages/dashboard-v2/src/hooks/useActivePlan.js @@ -4,7 +4,7 @@ import freeTier from "../lib/tiers"; import { usePlans } from "../contexts/plans"; export default function useActivePlan(user) { - const { plans, error } = usePlans(); + const { plans, loading, error } = usePlans(); const [activePlan, setActivePlan] = useState(freeTier); @@ -17,6 +17,7 @@ export default function useActivePlan(user) { return { error, plans, + loading, activePlan, }; }