Skip to content

Commit

Permalink
fix: Jogging store is now disposed on motionGroupId change
Browse files Browse the repository at this point in the history
  • Loading branch information
evrys committed Sep 23, 2024
1 parent 39d5e72 commit fc82d24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/jogging/JoggingPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Paper, Stack, Tab, Tabs, useTheme } from "@mui/material"
import { Stack, Tab, Tabs } from "@mui/material"
import { NovaClient } from "@wandelbots/wandelbots-js"
import { isString } from "lodash-es"
import { runInAction } from "mobx"
Expand Down Expand Up @@ -29,8 +29,6 @@ export type JoggingPanelProps = {
*/
export const JoggingPanel = externalizeComponent(
observer((props: JoggingPanelProps) => {
const theme = useTheme()

const nova = isString(props.nova)
? new NovaClient({ instanceUrl: props.nova })
: props.nova
Expand Down Expand Up @@ -65,7 +63,7 @@ export const JoggingPanel = externalizeComponent(
return () => {
state.joggingStore?.dispose()
}
}, [props.nova])
}, [props.nova, props.motionGroupId])

useEffect(() => {
const store = state.joggingStore
Expand Down
File renamed without changes.

0 comments on commit fc82d24

Please sign in to comment.