Skip to content

Commit

Permalink
fix: production page fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasMaupin committed Nov 1, 2024
1 parent f2809c7 commit 467f827
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/production/ProductionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,17 @@ const ProductionPage: React.FC<ProductionPageProps> = (props) => {
}, []);

// EVERY TIME THE PRODUCTION IS UPDATE -> UPLOAD IT TO DB
useEffect(() => {
if (production) {
putProduction(production._id, production);
}
}, [production]);

useEffect(() => {
if (production?._id) {
setProduction({
putProduction(production._id, {
...production,
name: productionName,
sources,
pipelines,
outputs,
multiviews,
control_connection: controlConnection
} as Production);
});
}
}, [
productionName,
Expand Down

0 comments on commit 467f827

Please sign in to comment.