Skip to content

Commit

Permalink
Camera Feed: Ensure camera moves everytime the preset is clicked (#8254)
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad authored Aug 7, 2024
1 parent 258cf84 commit a169f02
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,14 @@ export const ConsultationFeedTab = (props: ConsultationTabProps) => {
result: "success",
});
setHasMoved(false);
setPreset(value);
// Voluntarily copying to trigger change of reference of the position attribute, so that the useEffect of CameraFeed that handles the moves gets triggered.
setPreset({
...value,
meta: {
...value.meta,
position: { ...value.meta.position },
},
});
}}
/>
{isUpdatingPreset ? (
Expand Down

0 comments on commit a169f02

Please sign in to comment.