feat(dashboard-v2): expose loading flag from useActivePlan hook

This commit is contained in:
Michał Leszczyk 2022-03-22 13:47:29 +01:00
parent c058270a79
commit bdf70e76e0
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
1 changed files with 2 additions and 1 deletions

View File

@ -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,
};
}