Skip to content

Commit

Permalink
Merge pull request #37 from gemini-hlsw/run-button-fix
Browse files Browse the repository at this point in the history
Fixed run button stay always loading after plan request
  • Loading branch information
dngomez authored Jul 22, 2024
2 parents b194b27 + 999b4c8 commit 562125a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { useContext, useEffect } from "react";
import { GlobalStateContext } from "./components/GlobalState/GlobalState";

function App() {
const { setNightPlans, setPlansSummary } = useContext(GlobalStateContext);
const { setNightPlans, setPlansSummary, setLoadingPlan } =
useContext(GlobalStateContext);
const { data: scheduleData, loading: subscriptionLoading } = useSubscription(
subscriptionQueueSchedule,
{
Expand All @@ -18,6 +19,7 @@ function App() {
if (!subscriptionLoading) {
setNightPlans(scheduleData?.queueSchedule?.nightPlans?.nightTimeline);
setPlansSummary(scheduleData?.queueSchedule?.plansSummary);
setLoadingPlan(false);
}
}, [scheduleData, subscriptionLoading]);

Expand Down

0 comments on commit 562125a

Please sign in to comment.