Skip to content

Commit a8f3259

Browse files
Anders Hafreagerclaude
andcommitted
fix: use direct value for setRenderSettings (fixes typecheck)
setRenderSettings is an easy-peasy action, not a React useState setter, so it only accepts a RenderSettings value directly — not a functional update callback. Revert to spreading renderSettings directly while keeping the isEmbeddedMode guard and tighter dependency array from the previous two commits. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 357946e commit a8f3259

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/containers/View.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -409,17 +409,12 @@ const View = ({ visible, isEmbeddedMode = false }: ViewProps) => {
409409
isEmbeddedMode &&
410410
renderSettings.showSimulationBox !== embedConfig.showSimulationBox
411411
) {
412-
setRenderSettings((prev) => ({
413-
...prev,
412+
setRenderSettings({
413+
...renderSettings,
414414
showSimulationBox: embedConfig.showSimulationBox,
415-
}));
415+
});
416416
}
417-
}, [
418-
isEmbeddedMode,
419-
embedConfig.showSimulationBox,
420-
renderSettings.showSimulationBox,
421-
setRenderSettings,
422-
]);
417+
}, [isEmbeddedMode, embedConfig.showSimulationBox, renderSettings, setRenderSettings]);
423418

424419
// Update camera planes based on simulation box bounds
425420
useEffect(() => {

0 commit comments

Comments
 (0)