updated as in the interactions api

This commit is contained in:
csawatzky 2025-04-21 16:40:30 -06:00
parent e8e32e1886
commit c617ebf868
12 changed files with 66 additions and 50 deletions

View file

@ -35,6 +35,7 @@ import { quack } from "protobuf-ts/quack";
import React, { useEffect, useState } from "react";
import InteractionSettings from "./InteractionSettings";
import { makeStyles } from "@mui/styles";
import { useGlobalState } from "providers";
const useStyles = makeStyles((theme: Theme) => {
return ({
@ -70,6 +71,7 @@ interface Props {
export default function InteractionsOverview(props: Props) {
const classes = useStyles();
const [{as}] = useGlobalState();
const interactionsAPI = useInteractionsAPI();
const { success, error } = useSnackbar();
const { device, component, components, permissions, refreshCallback } = props;
@ -200,7 +202,7 @@ export default function InteractionsOverview(props: Props) {
settings: pond.IInteractionSettings
) => {
interactionsAPI
.updateInteraction(Number(deviceID), settings)
.updateInteraction(Number(deviceID), settings, as)
.then((_response: any) => {
let updatedDirtyInteractions = cloneDeep(dirtyInteractions);
updatedDirtyInteractions.set(index, false);