Skip to content

Commit

Permalink
Adjusted function name
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Oct 12, 2023
1 parent 7445f32 commit 38e4830
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions frontend/src/modules/DistributionPlot/settings.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent } from "react";

import { BroadcastChannelKeyCategory } from "@framework/Broadcaster";
import { applyToStateOnMount } from "@framework/InitialSettings";
import { applyInitialSettingsToState } from "@framework/InitialSettings";
import { ModuleFCProps } from "@framework/Module";
import { ChannelSelect } from "@framework/components/ChannelSelect";
import { Dropdown } from "@lib/components/Dropdown";
Expand Down Expand Up @@ -63,13 +63,13 @@ export function settings({ moduleContext, workbenchServices, initialSettings }:
const [orientation, setOrientation] = moduleContext.useStoreState("orientation");
const [crossPlottingType, setCrossPlottingType] = React.useState<BroadcastChannelKeyCategory | null>(null);

applyToStateOnMount(initialSettings, "channelNameX", "string", setChannelNameX);
applyToStateOnMount(initialSettings, "channelNameY", "string", setChannelNameY);
applyToStateOnMount(initialSettings, "channelNameZ", "string", setChannelNameZ);
applyToStateOnMount(initialSettings, "plotType", "string", setPlotType);
applyToStateOnMount(initialSettings, "numBins", "number", setNumBins);
applyToStateOnMount(initialSettings, "orientation", "string", setOrientation);
applyToStateOnMount(initialSettings, "crossPlottingType", "string", setCrossPlottingType);
applyInitialSettingsToState(initialSettings, "channelNameX", "string", setChannelNameX);
applyInitialSettingsToState(initialSettings, "channelNameY", "string", setChannelNameY);
applyInitialSettingsToState(initialSettings, "channelNameZ", "string", setChannelNameZ);
applyInitialSettingsToState(initialSettings, "plotType", "string", setPlotType);
applyInitialSettingsToState(initialSettings, "numBins", "number", setNumBins);
applyInitialSettingsToState(initialSettings, "orientation", "string", setOrientation);
applyInitialSettingsToState(initialSettings, "crossPlottingType", "string", setCrossPlottingType);

const handleChannelXChanged = (channelName: string) => {
setChannelNameX(channelName);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/modules/TornadoChart/settings.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BroadcastChannelKeyCategory } from "@framework/Broadcaster";
import { applyToStateOnMount } from "@framework/InitialSettings";
import { applyInitialSettingsToState } from "@framework/InitialSettings";
import { ModuleFCProps } from "@framework/Module";
import { ChannelSelect } from "@framework/components/ChannelSelect";
import { Label } from "@lib/components/Label";
Expand All @@ -9,7 +9,7 @@ import { State } from "./state";
export function settings({ moduleContext, workbenchServices, initialSettings }: ModuleFCProps<State>) {
const [responseChannelName, setResponseChannelName] = moduleContext.useStoreState("responseChannelName");

applyToStateOnMount(initialSettings, "responseChannelName", "string", setResponseChannelName);
applyInitialSettingsToState(initialSettings, "responseChannelName", "string", setResponseChannelName);

function handleResponseChannelNameChange(channelName: string) {
setResponseChannelName(channelName);
Expand Down

0 comments on commit 38e4830

Please sign in to comment.