diff --git a/src/bapsicle.ts b/src/bapsicle.ts index 56330c4..b266944 100644 --- a/src/bapsicle.ts +++ b/src/bapsicle.ts @@ -58,7 +58,7 @@ export const bapsicleMiddleware: Middleware<{}, RootState, Dispatch> = ( store.getState().showplan.plan?.forEach((item) => { if ( item.channel === message.channel && - item.weight === message.planItem + item.weight === message.weight ) { itemToLoad = item; } diff --git a/src/navbar/BAPSicleModal.tsx b/src/navbar/BAPSicleModal.tsx index 0c49910..6213830 100644 --- a/src/navbar/BAPSicleModal.tsx +++ b/src/navbar/BAPSicleModal.tsx @@ -4,7 +4,11 @@ import Modal from "react-modal"; import { useDispatch, useSelector } from "react-redux"; import { Button } from "reactstrap"; import BAPSicleLogo from "../assets/images/bapsicle.png"; -import { connectBAPSicle, disconnectBAPSicle } from "../bapsicle"; +import { + connectBAPSicle, + disconnectBAPSicle, + sendBAPSicleChannel, +} from "../bapsicle"; import { RootState } from "../rootReducer"; interface BAPSicleModalProps { @@ -17,6 +21,7 @@ export function BAPSicleModal(props: BAPSicleModalProps) { const connectionState = useSelector((state: RootState) => state.connection); const [connectType, setConnectType] = useState("Connect"); const dispatch = useDispatch(); + const showplan = useSelector((state: RootState) => state.showplan); if ( connectType !== "Connect" && @@ -58,6 +63,21 @@ export function BAPSicleModal(props: BAPSicleModalProps) { props.close(); }} /> + ); } diff --git a/src/showplanner/Item.tsx b/src/showplanner/Item.tsx index be8c3b7..bbe225f 100644 --- a/src/showplanner/Item.tsx +++ b/src/showplanner/Item.tsx @@ -41,7 +41,7 @@ export const Item = memo(function Item({ sendBAPSicleChannel({ channel: column, command: "LOAD", - planItem: index, + weight: index, }); dispatch(MixerState.load(column, x)); }