From f96d1184b17871a360a6fc8725470c17ba67cad1 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Wed, 22 Apr 2026 10:38:51 -0600 Subject: [PATCH 1/4] changing date range when zooming airflow --- package-lock.json | 2 +- src/gate/GateDeltaTempGraph.tsx | 1 - src/gate/GateFlowGraph.tsx | 13 +++++++---- src/gate/GateGraphs.tsx | 40 ++++++++++++++++++++++----------- 4 files changed, 37 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cd53e8..9ca1dff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11205,7 +11205,7 @@ }, "node_modules/protobuf-ts": { "version": "1.0.0", - "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#9c0f668d4a56b8216dd71a44c3110a818aaf3541", + "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#0aa61453c8641cf5ede545949a5f2f89f6c393ec", "dependencies": { "protobufjs": "^6.8.8" } diff --git a/src/gate/GateDeltaTempGraph.tsx b/src/gate/GateDeltaTempGraph.tsx index b5baef1..6cd8a08 100644 --- a/src/gate/GateDeltaTempGraph.tsx +++ b/src/gate/GateDeltaTempGraph.tsx @@ -110,7 +110,6 @@ export default function GateDeltaTempGraph(props: Props){ end.toISOString(), 500 ).then(resp => { - console.log(resp) if(resp.data.measurements){ let tempCompMeasurements = resp.data.measurements.map(um => UnitMeasurement.any(um, user)); //if there is an ambient component, then treat the temp component like a single sensor and not a chain, and use the ambient measurements as the inlet diff --git a/src/gate/GateFlowGraph.tsx b/src/gate/GateFlowGraph.tsx index b9a85b1..2e254e7 100644 --- a/src/gate/GateFlowGraph.tsx +++ b/src/gate/GateFlowGraph.tsx @@ -15,7 +15,7 @@ import { Gate } from "models/Gate"; import moment, { Moment } from "moment"; import { pond } from "protobuf-ts/pond"; import { useGateAPI, useGlobalState } from "providers"; -import React, { useEffect, useState } from "react"; +import React, { useCallback, useEffect, useState } from "react"; interface Props { gate: Gate; @@ -74,12 +74,13 @@ export default function GateFlowGraph(props: Props) { const eventThreshold = 5; //the threshold that if crossed from one measurement to the next during a flow event will end the current flow event and start a new one //const idleFlow = 3.5; //the mass air flow that must be crossed in order to start a flow event, anything below this will not start an event but must go below this to end an event const [idleFlow, setIdleFlow] = useState(3.5) - - useEffect(() => { + + const loadData = useCallback(()=>{ if (loadingChartData) return; if (ambient && pressureComponent) { let gateIdle = idleFlow if(gate.settings.idleFlow){ + setIdleFlow(gate.settings.idleFlow) gateIdle = gate.settings.idleFlow } @@ -146,7 +147,11 @@ export default function GateFlowGraph(props: Props) { setRecent(recent); }); } - }, [gateAPI, gate, ambient, pressureComponent, start, end, device, as]); // eslint-disable-line react-hooks/exhaustive-deps + },[gateAPI, gate, ambient, pressureComponent, start, end, device, as]) + + useEffect(() => { + loadData() + }, [loadData]); // eslint-disable-line react-hooks/exhaustive-deps const loadFlowEvents = () => { if (ambient && pressureComponent) { diff --git a/src/gate/GateGraphs.tsx b/src/gate/GateGraphs.tsx index 5a3a039..9858b0c 100644 --- a/src/gate/GateGraphs.tsx +++ b/src/gate/GateGraphs.tsx @@ -102,17 +102,18 @@ export default function GateGraphs(props: Props) { }, [gate, endDate, gateAPI, startDate, as]); // eslint-disable-line react-hooks/exhaustive-deps const updateDateRange = (newStartDate: any, newEndDate: any) => { - let range = GetDefaultDateRange(); - range.start = newStartDate; - range.end = newEndDate; + // let range = GetDefaultDateRange(); + // range.start = newStartDate; + // range.end = newEndDate; setStartDate(newStartDate); setEndDate(newEndDate); }; - const zoomOut = () => { - setXDomain(["dataMin", "dataMax"]); - setZoomed(false); - }; + // const zoomOut = () => { + // setXDomain(["dataMin", "dataMax"]); + + // setZoomed(false); + // }; const lineGraph = ( unitMeasurement: UnitMeasurement, @@ -177,6 +178,7 @@ export default function GateGraphs(props: Props) { multiGraphZoom={domain => { setXDomain(domain); setZoomed(true); + //set new start and end here as well }} multiGraphZoomOut /> @@ -241,6 +243,7 @@ export default function GateGraphs(props: Props) { multiGraphZoom={domain => { setXDomain(domain); setZoomed(true); + //update the start and end here as well }} multiGraphZoomOut /> @@ -250,7 +253,6 @@ export default function GateGraphs(props: Props) { const graphHeader = (comp: Component) => { const componentIcon = GetComponentIcon(comp.settings.type, comp.settings.subtype, themeType); - console.log(comp) let measurement = cloneDeep(comp.status.measurement) let umArray = measurement.map(um => UnitMeasurement.create(um, user)) return ( @@ -360,13 +362,25 @@ export default function GateGraphs(props: Props) { // setPCAState(state); // }} multiGraphZoom={domain => { - setXDomain(domain); - setZoomed(true); + //need to update the dateRange here so that the graph re-loads data + if(domain[0] && !isNaN(parseInt(domain[0] as string))){ + setStartDate(moment(domain[0])) + } + if(domain[1] && !isNaN(parseInt(domain[1] as string))){ + setEndDate(moment(domain[1])) + } }} /> {/* add a new chart here for the delta temp over time */} {tempComp && - + } ); @@ -387,13 +401,13 @@ export default function GateGraphs(props: Props) { - {zoomed && ( + {/* {zoomed && ( - )} + )} */} {loading ? : showGraphs()} From 6565b854b6ed7c97f125eb775012aeecae7c26b5 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Wed, 22 Apr 2026 14:52:06 -0600 Subject: [PATCH 2/4] using the expiry time in the gate status for whehter its missing or not --- package-lock.json | 2 +- src/gate/GateDeltaTempGraph.tsx | 7 +++-- src/gate/GateFlowGraph.tsx | 11 -------- src/gate/GateGraphs.tsx | 48 +++++++++++++++------------------ src/gate/GateList.tsx | 7 ++++- 5 files changed, 33 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9ca1dff..a8d3068 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11205,7 +11205,7 @@ }, "node_modules/protobuf-ts": { "version": "1.0.0", - "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#0aa61453c8641cf5ede545949a5f2f89f6c393ec", + "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#29d9765ce93c04ad70d795b80e9873fc2fc5f600", "dependencies": { "protobufjs": "^6.8.8" } diff --git a/src/gate/GateDeltaTempGraph.tsx b/src/gate/GateDeltaTempGraph.tsx index 6cd8a08..d4a4465 100644 --- a/src/gate/GateDeltaTempGraph.tsx +++ b/src/gate/GateDeltaTempGraph.tsx @@ -20,6 +20,7 @@ interface Props { ambient?: Component start: Moment; end: Moment; + multiGraphZoom?: (domain: number[] | string[]) => void; } export default function GateDeltaTempGraph(props: Props){ @@ -28,7 +29,8 @@ export default function GateDeltaTempGraph(props: Props){ ambient, deviceID, start, - end + end, + multiGraphZoom } = props const [data, setData] = useState([]) const [{user}] = useGlobalState() @@ -216,7 +218,8 @@ export default function GateDeltaTempGraph(props: Props){ tooltipUnit={user.tempUnit() === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT ? " °F" : " °C"} yAxisLabel={"Delta T" + (user.tempUnit() === pond.TemperatureUnit.TEMPERATURE_UNIT_FAHRENHEIT ? " °F" : " °C")} colourAboveZero={{colour: warmingColour, label: "Heating"}} - colourBelowZero={{colour: coolingColour, label: "Cooling"}}/> + colourBelowZero={{colour: coolingColour, label: "Cooling"}} + multiGraphZoom={multiGraphZoom}/> ) diff --git a/src/gate/GateFlowGraph.tsx b/src/gate/GateFlowGraph.tsx index 2e254e7..458d377 100644 --- a/src/gate/GateFlowGraph.tsx +++ b/src/gate/GateFlowGraph.tsx @@ -25,7 +25,6 @@ interface Props { ambient?: string; newXDomain?: number[] | string[]; pressureComponent?: string; - // setPCAState: (state: boolean) => void; multiGraphZoom?: (domain: number[] | string[]) => void; } @@ -55,7 +54,6 @@ export default function GateFlowGraph(props: Props) { device, ambient, pressureComponent, - // setPCAState, start, end, newXDomain, @@ -132,15 +130,6 @@ export default function GateFlowGraph(props: Props) { } }); setRuntime(moment.duration(runtime)); - // let state = false; - // if ( - // data.length > 1 && - // data[data.length - 1].value > gate.lowerFlow() && - // data[data.length - 1].value < gate.upperFlow() - // ) { - // state = true; - // } - // setPCAState(state); } setFlowData(data); setLoadingChartData(false); diff --git a/src/gate/GateGraphs.tsx b/src/gate/GateGraphs.tsx index 9858b0c..319b137 100644 --- a/src/gate/GateGraphs.tsx +++ b/src/gate/GateGraphs.tsx @@ -101,19 +101,24 @@ export default function GateGraphs(props: Props) { }); }, [gate, endDate, gateAPI, startDate, as]); // eslint-disable-line react-hooks/exhaustive-deps - const updateDateRange = (newStartDate: any, newEndDate: any) => { - // let range = GetDefaultDateRange(); - // range.start = newStartDate; - // range.end = newEndDate; + const updateDateRange = (newStartDate: moment.Moment, newEndDate: moment.Moment) => { setStartDate(newStartDate); setEndDate(newEndDate); }; - // const zoomOut = () => { - // setXDomain(["dataMin", "dataMax"]); + const zoomGraphs = (domain: string[] | number[]) => { + setZoomed(true) + if((domain[0] && !isNaN(parseInt(domain[0] as string))) && (domain[1] && !isNaN(parseInt(domain[1] as string)))){ + updateDateRange(moment(domain[0]),moment(domain[1])) + } + } - // setZoomed(false); - // }; + const zoomOut = () => { + let d = GetDefaultDateRange() + setStartDate(d.start) + setEndDate(d.end) + setZoomed(false); + }; const lineGraph = ( unitMeasurement: UnitMeasurement, @@ -176,9 +181,7 @@ export default function GateGraphs(props: Props) { tooltip newXDomain={xDomain} multiGraphZoom={domain => { - setXDomain(domain); - setZoomed(true); - //set new start and end here as well + zoomGraphs(domain) }} multiGraphZoomOut /> @@ -241,9 +244,7 @@ export default function GateGraphs(props: Props) { tooltip newXDomain={xDomain} multiGraphZoom={domain => { - setXDomain(domain); - setZoomed(true); - //update the start and end here as well + zoomGraphs(domain) }} multiGraphZoomOut /> @@ -358,17 +359,8 @@ export default function GateGraphs(props: Props) { gate={gate} ambient={ambient} pressureComponent={pressure} - // setPCAState={(state: boolean) => { - // setPCAState(state); - // }} multiGraphZoom={domain => { - //need to update the dateRange here so that the graph re-loads data - if(domain[0] && !isNaN(parseInt(domain[0] as string))){ - setStartDate(moment(domain[0])) - } - if(domain[1] && !isNaN(parseInt(domain[1] as string))){ - setEndDate(moment(domain[1])) - } + zoomGraphs(domain) }} /> {/* add a new chart here for the delta temp over time */} @@ -379,7 +371,9 @@ export default function GateGraphs(props: Props) { end={endDate} tempComponent={tempComp} ambient={ambientComp} - + multiGraphZoom={domain => { + zoomGraphs(domain) + }} /> } @@ -401,13 +395,13 @@ export default function GateGraphs(props: Props) { - {/* {zoomed && ( + {zoomed && ( - )} */} + )} {loading ? : showGraphs()} diff --git a/src/gate/GateList.tsx b/src/gate/GateList.tsx index ba521cc..a2f4f77 100644 --- a/src/gate/GateList.tsx +++ b/src/gate/GateList.tsx @@ -272,7 +272,12 @@ export default function GateList(props: Props) { // cellStyle: {width: 100000}, // sortKey: "state", render: gate => { - const deviceStateHelper = getDeviceStateHelper(gate.status.pcaDeviceState); + let deviceStateHelper = getDeviceStateHelper(pond.DeviceState.DEVICE_STATE_UNKNOWN); + if(moment().isAfter(moment(gate.status.deviceStateExpires).add(1, 'hour'))){ + deviceStateHelper = getDeviceStateHelper(pond.DeviceState.DEVICE_STATE_MISSING) + }else{ + deviceStateHelper = getDeviceStateHelper(gate.status.pcaDeviceState) + } return ( {deviceStateHelper.icon} From aa6219f4b7ad4d640d6ef5f991f80569fec5976d Mon Sep 17 00:00:00 2001 From: csawatzky Date: Mon, 27 Apr 2026 09:12:14 -0600 Subject: [PATCH 3/4] hotfix for when adding alerts from the bin page the conditions in the interaction were being showed in the converted value --- package-lock.json | 2 +- src/device/autoDetect/DeviceScannedComponents.tsx | 1 + src/objects/objectInteractions/NewObjectInteraction.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cd53e8..a8d3068 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11205,7 +11205,7 @@ }, "node_modules/protobuf-ts": { "version": "1.0.0", - "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#9c0f668d4a56b8216dd71a44c3110a818aaf3541", + "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#29d9765ce93c04ad70d795b80e9873fc2fc5f600", "dependencies": { "protobufjs": "^6.8.8" } diff --git a/src/device/autoDetect/DeviceScannedComponents.tsx b/src/device/autoDetect/DeviceScannedComponents.tsx index 2be89a9..dda2bf4 100644 --- a/src/device/autoDetect/DeviceScannedComponents.tsx +++ b/src/device/autoDetect/DeviceScannedComponents.tsx @@ -71,6 +71,7 @@ export default function DeviceScannedComponents(props: Props){ let valid: quack.AddressData[] = [] //filter the address data let addr = scannedI2C?.settings?.foundAddresses + console.log(addr) if(addr){ addr.forEach(addrData => { if(!i2cBlacklistAddresses.includes(addrData.address)){ diff --git a/src/objects/objectInteractions/NewObjectInteraction.tsx b/src/objects/objectInteractions/NewObjectInteraction.tsx index 40aed71..8e68a3f 100644 --- a/src/objects/objectInteractions/NewObjectInteraction.tsx +++ b/src/objects/objectInteractions/NewObjectInteraction.tsx @@ -262,7 +262,7 @@ export default function NewObjectInteraction(props: Props){ const conditionGroup = (condition: pond.InteractionCondition, index: number) => { let measurementType = condition.measurementType; - let describer = describeMeasurement(measurementType, newAlertComponentType); + let describer = describeMeasurement(measurementType, newAlertComponentType, undefined, undefined, user); let isBoolean = condition.measurementType === Measurement.boolean; return ( From 13346403e55e66a7af3dfe4a4aa7d25b1faa64d5 Mon Sep 17 00:00:00 2001 From: Carter Date: Tue, 19 May 2026 13:25:11 -0600 Subject: [PATCH 4/4] fixed compilation warnings caused by lazy loading modules --- src/pages/Bins.tsx | 4 ++-- src/pages/Device.tsx | 5 +++-- src/pages/DeviceComponent.tsx | 3 ++- src/pages/Devices.tsx | 7 ++++--- src/pages/Team.tsx | 3 ++- src/providers/pond/ObjectHeaterAPI.tsx | 4 ++-- src/providers/pond/backpackAPI.tsx | 2 +- src/providers/pond/binAPI.tsx | 5 +++-- src/providers/pond/binYardAPI.tsx | 4 ++-- src/providers/pond/cnhiProxyAPI.tsx | 2 +- src/providers/pond/componentAPI.tsx | 4 ++-- src/providers/pond/contractAPI.tsx | 4 ++-- src/providers/pond/datadogProxyAPI.tsx | 2 +- src/providers/pond/deviceAPI.tsx | 5 +++-- src/providers/pond/devicePresetAPI.tsx | 4 ++-- src/providers/pond/fieldAPI.tsx | 4 ++-- src/providers/pond/fieldMarkerAPI.tsx | 4 ++-- src/providers/pond/fileControllerAPI.tsx | 2 +- src/providers/pond/firmwareAPI.tsx | 2 +- src/providers/pond/gateAPI.tsx | 4 ++-- src/providers/pond/grainAPI.tsx | 4 ++-- src/providers/pond/grainBagAPI.tsx | 4 ++-- src/providers/pond/groupAPI.tsx | 5 +++-- src/providers/pond/harvestPlanAPI.tsx | 2 +- src/providers/pond/homeMarkerAPI.tsx | 4 ++-- src/providers/pond/imagekitAPI.tsx | 4 ++-- src/providers/pond/interactionsAPI.tsx | 2 +- src/providers/pond/johnDeereProxyAPI.tsx | 2 +- src/providers/pond/keyManagerAPI.tsx | 2 +- src/providers/pond/libracartProxyAPI.tsx | 2 +- src/providers/pond/mineAPI.tsx | 2 +- src/providers/pond/mutationAPI.tsx | 4 ++-- src/providers/pond/noteAPI.tsx | 4 ++-- src/providers/pond/notificationAPI.tsx | 4 ++-- src/providers/pond/permissionAPI.tsx | 4 ++-- src/providers/pond/preferenceAPI.tsx | 2 +- src/providers/pond/siteAPI.tsx | 2 +- src/providers/pond/tagAPI.tsx | 2 +- src/providers/pond/taskAPI.tsx | 4 ++-- src/providers/pond/teamAPI.tsx | 4 ++-- src/providers/pond/terminalAPI.tsx | 4 ++-- src/providers/pond/transactionAPI.tsx | 4 ++-- src/providers/pond/usageAPI.tsx | 4 ++-- src/providers/pond/userAPI.tsx | 4 ++-- src/services/restAPI.js | 2 +- src/teams/TeamList.tsx | 3 ++- src/teams/TeamSettings.tsx | 3 ++- 47 files changed, 85 insertions(+), 76 deletions(-) diff --git a/src/pages/Bins.tsx b/src/pages/Bins.tsx index 7529f3f..7adde4e 100644 --- a/src/pages/Bins.tsx +++ b/src/pages/Bins.tsx @@ -58,9 +58,9 @@ import { // useBinYardAPI, useGlobalState, useInteractionsAPI, - useSnackbar, - useTeamAPI + useSnackbar } from "providers"; +import { useTeamAPI } from "providers/pond/teamAPI"; import React, { SetStateAction, useCallback, useEffect, useState } from "react"; // import { getThemeType } from "theme"; import { stringToMaterialColour } from "utils"; diff --git a/src/pages/Device.tsx b/src/pages/Device.tsx index 55fd8b9..6c9535d 100644 --- a/src/pages/Device.tsx +++ b/src/pages/Device.tsx @@ -7,7 +7,8 @@ import { useDeviceStatusStreams } from "hooks/useDeviceStatusStreams"; import { useCallback, useEffect, useMemo, useState } from "react"; import { useLocation, useParams } from "react-router-dom"; import PageContainer from "./PageContainer"; -import { useHTTP, useMobile } from "hooks"; +import { useMobile } from "hooks"; +import { useHTTP } from "providers/http"; import LoadingScreen from "app/LoadingScreen"; import SmartBreadcrumb from "common/SmartBreadcrumb"; import DeviceActions from "device/DeviceActions"; @@ -623,4 +624,4 @@ export default function DevicePage() { {componentCards()} ); -} \ No newline at end of file +} diff --git a/src/pages/DeviceComponent.tsx b/src/pages/DeviceComponent.tsx index ad92c3a..a245e51 100644 --- a/src/pages/DeviceComponent.tsx +++ b/src/pages/DeviceComponent.tsx @@ -38,7 +38,8 @@ import { } from "pbHelpers/DeviceAvailability"; import { getDefaultInteraction } from "pbHelpers/Interaction"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState, useTeamAPI } from "providers"; +import { useGlobalState } from "providers"; +import { useTeamAPI } from "providers/pond/teamAPI"; import { useCallback, useEffect, useRef, useState } from "react"; import { useParams } from "react-router-dom"; // import { useRouteMatch } from "react-router"; diff --git a/src/pages/Devices.tsx b/src/pages/Devices.tsx index ea31e7f..54ff584 100644 --- a/src/pages/Devices.tsx +++ b/src/pages/Devices.tsx @@ -5,8 +5,9 @@ import { makeStyles } from "@mui/styles"; import ResponsiveTable, { Column } from "common/ResponsiveTable"; import ProvisionDevice from "device/ProvisionDevice"; import { pond } from "protobuf-ts/pond"; -import { useDeviceAPI, useGlobalState, useGroupAPI, useTeamAPI } from "providers"; -import { useHTTP } from "hooks"; +import { useDeviceAPI, useGlobalState, useGroupAPI } from "providers"; +import { useHTTP } from "providers/http"; +import { useTeamAPI } from "providers/pond/teamAPI"; import { useDeviceStatusStreams } from "hooks/useDeviceStatusStreams"; import { useCallback, useEffect, useMemo, useState } from "react"; import PageContainer from "./PageContainer"; @@ -1204,4 +1205,4 @@ export default function Devices() { /> ) -} \ No newline at end of file +} diff --git a/src/pages/Team.tsx b/src/pages/Team.tsx index f17d965..b38d506 100644 --- a/src/pages/Team.tsx +++ b/src/pages/Team.tsx @@ -12,7 +12,8 @@ import { appendToUrl } from "navigation/Router"; import PageContainer from "pages/PageContainer"; import { getContextKeys, getContextTypes } from "pbHelpers/Context"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState, useSnackbar, useTeamAPI, useUserAPI } from "providers"; +import { useGlobalState, useSnackbar, useUserAPI } from "providers"; +import { useTeamAPI } from "providers/pond/teamAPI"; import { useEffect, useState } from "react"; import { useLocation, useNavigate, useParams } from 'react-router-dom'; import { getSignatureAccentColour, IsAdaptiveAgriculture, IsStreamline } from "services/whiteLabel"; diff --git a/src/providers/pond/ObjectHeaterAPI.tsx b/src/providers/pond/ObjectHeaterAPI.tsx index e4f9d2f..64e174b 100644 --- a/src/providers/pond/ObjectHeaterAPI.tsx +++ b/src/providers/pond/ObjectHeaterAPI.tsx @@ -1,7 +1,7 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import React, { createContext, PropsWithChildren, useContext } from "react"; import { or } from "utils"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/backpackAPI.tsx b/src/providers/pond/backpackAPI.tsx index 0c05589..c533637 100644 --- a/src/providers/pond/backpackAPI.tsx +++ b/src/providers/pond/backpackAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/binAPI.tsx b/src/providers/pond/binAPI.tsx index e0d46f9..7c6f267 100644 --- a/src/providers/pond/binAPI.tsx +++ b/src/providers/pond/binAPI.tsx @@ -1,4 +1,5 @@ -import { useHTTP, usePermissionAPI } from "hooks"; +import { useHTTP } from "../http"; +import { usePermissionAPI } from "./permissionAPI"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { has, or } from "utils/types"; @@ -6,7 +7,7 @@ import { User, binScope } from "models"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; import { dateRange } from "providers/http"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { quack } from "protobuf-ts/quack"; export interface IBinAPIContext { diff --git a/src/providers/pond/binYardAPI.tsx b/src/providers/pond/binYardAPI.tsx index b8d270e..f3a64a4 100644 --- a/src/providers/pond/binYardAPI.tsx +++ b/src/providers/pond/binYardAPI.tsx @@ -1,10 +1,10 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { or } from "utils/types"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface IBinYardAPIContext { addBinYard: (bin: pond.BinYardSettings, otherTeam?: string) => Promise>; diff --git a/src/providers/pond/cnhiProxyAPI.tsx b/src/providers/pond/cnhiProxyAPI.tsx index 3642783..8b70746 100644 --- a/src/providers/pond/cnhiProxyAPI.tsx +++ b/src/providers/pond/cnhiProxyAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; //import { or } from "utils"; diff --git a/src/providers/pond/componentAPI.tsx b/src/providers/pond/componentAPI.tsx index d073b83..3e2207e 100644 --- a/src/providers/pond/componentAPI.tsx +++ b/src/providers/pond/componentAPI.tsx @@ -1,4 +1,4 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; // import { useWebsocket } from "websocket"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; @@ -7,7 +7,7 @@ import { getComponentIDString } from "pbHelpers/Component"; import { Component } from "models"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { quack } from "protobuf-ts/quack"; export interface IComponentAPIContext { diff --git a/src/providers/pond/contractAPI.tsx b/src/providers/pond/contractAPI.tsx index 3569b52..60d17fe 100644 --- a/src/providers/pond/contractAPI.tsx +++ b/src/providers/pond/contractAPI.tsx @@ -1,9 +1,9 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface IContractInterface { addContract: ( diff --git a/src/providers/pond/datadogProxyAPI.tsx b/src/providers/pond/datadogProxyAPI.tsx index ec957a4..8afe849 100644 --- a/src/providers/pond/datadogProxyAPI.tsx +++ b/src/providers/pond/datadogProxyAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/deviceAPI.tsx b/src/providers/pond/deviceAPI.tsx index 241781b..a7c0352 100644 --- a/src/providers/pond/deviceAPI.tsx +++ b/src/providers/pond/deviceAPI.tsx @@ -1,10 +1,11 @@ -import { useHTTP, usePermissionAPI } from "hooks"; +import { useHTTP } from "../http"; +import { usePermissionAPI } from "./permissionAPI"; import { Component, deviceScope, User } from "models"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import moment from "moment"; import { or } from "utils/types"; import { dateRange } from "providers/http"; diff --git a/src/providers/pond/devicePresetAPI.tsx b/src/providers/pond/devicePresetAPI.tsx index e24d97c..13ed37c 100644 --- a/src/providers/pond/devicePresetAPI.tsx +++ b/src/providers/pond/devicePresetAPI.tsx @@ -1,9 +1,9 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface IDevicePresetInterface { //add diff --git a/src/providers/pond/fieldAPI.tsx b/src/providers/pond/fieldAPI.tsx index be980eb..4f8cc76 100644 --- a/src/providers/pond/fieldAPI.tsx +++ b/src/providers/pond/fieldAPI.tsx @@ -1,7 +1,7 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import React, { createContext, PropsWithChildren, useContext } from "react"; import { or } from "utils"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/fieldMarkerAPI.tsx b/src/providers/pond/fieldMarkerAPI.tsx index f66f616..42b3b4e 100644 --- a/src/providers/pond/fieldMarkerAPI.tsx +++ b/src/providers/pond/fieldMarkerAPI.tsx @@ -1,7 +1,7 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/fileControllerAPI.tsx b/src/providers/pond/fileControllerAPI.tsx index 0208584..8b85887 100644 --- a/src/providers/pond/fileControllerAPI.tsx +++ b/src/providers/pond/fileControllerAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { useGlobalState } from "providers/StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; diff --git a/src/providers/pond/firmwareAPI.tsx b/src/providers/pond/firmwareAPI.tsx index 43049c9..7bba5ce 100644 --- a/src/providers/pond/firmwareAPI.tsx +++ b/src/providers/pond/firmwareAPI.tsx @@ -1,4 +1,4 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { useGlobalState } from "providers/StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; diff --git a/src/providers/pond/gateAPI.tsx b/src/providers/pond/gateAPI.tsx index 5b07606..fa6de0f 100644 --- a/src/providers/pond/gateAPI.tsx +++ b/src/providers/pond/gateAPI.tsx @@ -1,9 +1,9 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface IGateInterface { addGate: ( diff --git a/src/providers/pond/grainAPI.tsx b/src/providers/pond/grainAPI.tsx index 0df0055..93e33c6 100644 --- a/src/providers/pond/grainAPI.tsx +++ b/src/providers/pond/grainAPI.tsx @@ -1,9 +1,9 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { or } from "utils"; export interface IGrainInterface { diff --git a/src/providers/pond/grainBagAPI.tsx b/src/providers/pond/grainBagAPI.tsx index 7dbdfd7..71a052b 100644 --- a/src/providers/pond/grainBagAPI.tsx +++ b/src/providers/pond/grainBagAPI.tsx @@ -1,9 +1,9 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import React, { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface IGrainBagInterface { addGrainBag: ( diff --git a/src/providers/pond/groupAPI.tsx b/src/providers/pond/groupAPI.tsx index 45d140c..96c578e 100644 --- a/src/providers/pond/groupAPI.tsx +++ b/src/providers/pond/groupAPI.tsx @@ -1,11 +1,12 @@ -import { useHTTP, usePermissionAPI } from "hooks"; +import { useHTTP } from "../http"; +import { usePermissionAPI } from "./permissionAPI"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { or } from "utils/types"; import { User, groupScope } from "models"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { getContextKeys, getContextTypes } from "pbHelpers/Context"; export interface IGroupAPIContext { diff --git a/src/providers/pond/harvestPlanAPI.tsx b/src/providers/pond/harvestPlanAPI.tsx index 6c0fbb4..14aa571 100644 --- a/src/providers/pond/harvestPlanAPI.tsx +++ b/src/providers/pond/harvestPlanAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { useGlobalState } from "providers/StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; diff --git a/src/providers/pond/homeMarkerAPI.tsx b/src/providers/pond/homeMarkerAPI.tsx index 165cf73..82bb9b3 100644 --- a/src/providers/pond/homeMarkerAPI.tsx +++ b/src/providers/pond/homeMarkerAPI.tsx @@ -1,7 +1,7 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/imagekitAPI.tsx b/src/providers/pond/imagekitAPI.tsx index d387241..a827b83 100644 --- a/src/providers/pond/imagekitAPI.tsx +++ b/src/providers/pond/imagekitAPI.tsx @@ -1,6 +1,6 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; diff --git a/src/providers/pond/interactionsAPI.tsx b/src/providers/pond/interactionsAPI.tsx index 5fa3705..2dab41f 100644 --- a/src/providers/pond/interactionsAPI.tsx +++ b/src/providers/pond/interactionsAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { Interaction } from "models"; import { componentIDToString } from "pbHelpers/Component"; import { pond } from "protobuf-ts/pond"; diff --git a/src/providers/pond/johnDeereProxyAPI.tsx b/src/providers/pond/johnDeereProxyAPI.tsx index 4042292..7382cb7 100644 --- a/src/providers/pond/johnDeereProxyAPI.tsx +++ b/src/providers/pond/johnDeereProxyAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; //import { or } from "utils"; diff --git a/src/providers/pond/keyManagerAPI.tsx b/src/providers/pond/keyManagerAPI.tsx index 68993b7..fb65725 100644 --- a/src/providers/pond/keyManagerAPI.tsx +++ b/src/providers/pond/keyManagerAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/libracartProxyAPI.tsx b/src/providers/pond/libracartProxyAPI.tsx index b56f65b..f470481 100644 --- a/src/providers/pond/libracartProxyAPI.tsx +++ b/src/providers/pond/libracartProxyAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import React, { createContext, PropsWithChildren, useContext } from "react"; //import { or } from "utils"; diff --git a/src/providers/pond/mineAPI.tsx b/src/providers/pond/mineAPI.tsx index ad55e52..fe6c2e9 100644 --- a/src/providers/pond/mineAPI.tsx +++ b/src/providers/pond/mineAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { permissionToString } from "pbHelpers/Permission"; import { pond } from "protobuf-ts/pond"; import { useGlobalState } from "providers/StateContainer"; diff --git a/src/providers/pond/mutationAPI.tsx b/src/providers/pond/mutationAPI.tsx index ffe4693..b8dd641 100644 --- a/src/providers/pond/mutationAPI.tsx +++ b/src/providers/pond/mutationAPI.tsx @@ -1,9 +1,9 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface IMutationAPIContext { linearMutation: ( diff --git a/src/providers/pond/noteAPI.tsx b/src/providers/pond/noteAPI.tsx index a53bd52..8f385da 100644 --- a/src/providers/pond/noteAPI.tsx +++ b/src/providers/pond/noteAPI.tsx @@ -1,7 +1,7 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; -// import { useGlobalState } from "providers"; +// import { useGlobalState } from "../StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/notificationAPI.tsx b/src/providers/pond/notificationAPI.tsx index 7af3bfe..6827ce8 100644 --- a/src/providers/pond/notificationAPI.tsx +++ b/src/providers/pond/notificationAPI.tsx @@ -1,10 +1,10 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import React, { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { or } from "utils/types"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface INotificationAPIContext { listNotifications: ( diff --git a/src/providers/pond/permissionAPI.tsx b/src/providers/pond/permissionAPI.tsx index 68fa5c9..9ec405a 100644 --- a/src/providers/pond/permissionAPI.tsx +++ b/src/providers/pond/permissionAPI.tsx @@ -1,9 +1,9 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { Scope, Team, User } from "models"; import { permissionToString } from "pbHelpers/Permission"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; import { objectQueryParams, pondURL } from "./pond"; diff --git a/src/providers/pond/preferenceAPI.tsx b/src/providers/pond/preferenceAPI.tsx index 91ed9b7..e51776a 100644 --- a/src/providers/pond/preferenceAPI.tsx +++ b/src/providers/pond/preferenceAPI.tsx @@ -1,4 +1,4 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/siteAPI.tsx b/src/providers/pond/siteAPI.tsx index 95f0a45..596056e 100644 --- a/src/providers/pond/siteAPI.tsx +++ b/src/providers/pond/siteAPI.tsx @@ -1,5 +1,5 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { useGlobalState } from "providers/StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; diff --git a/src/providers/pond/tagAPI.tsx b/src/providers/pond/tagAPI.tsx index 071591b..7f09461 100644 --- a/src/providers/pond/tagAPI.tsx +++ b/src/providers/pond/tagAPI.tsx @@ -1,4 +1,4 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/taskAPI.tsx b/src/providers/pond/taskAPI.tsx index 087b3d0..912d87a 100644 --- a/src/providers/pond/taskAPI.tsx +++ b/src/providers/pond/taskAPI.tsx @@ -1,7 +1,7 @@ import { AxiosResponse } from "axios"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/teamAPI.tsx b/src/providers/pond/teamAPI.tsx index 911ee91..1c1a267 100644 --- a/src/providers/pond/teamAPI.tsx +++ b/src/providers/pond/teamAPI.tsx @@ -1,11 +1,11 @@ import { AxiosResponse } from "axios"; import { Scope, Team } from "models"; -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; import { or } from "utils/types"; import { pondURL } from "./pond"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface ITeamAPIContext { addTeam: (team: pond.TeamSettings) => Promise>; diff --git a/src/providers/pond/terminalAPI.tsx b/src/providers/pond/terminalAPI.tsx index 26297c3..46ecf30 100644 --- a/src/providers/pond/terminalAPI.tsx +++ b/src/providers/pond/terminalAPI.tsx @@ -1,9 +1,9 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; export interface ITerminalAPIContext { addTerminal: ( diff --git a/src/providers/pond/transactionAPI.tsx b/src/providers/pond/transactionAPI.tsx index fc1db72..48904bf 100644 --- a/src/providers/pond/transactionAPI.tsx +++ b/src/providers/pond/transactionAPI.tsx @@ -1,9 +1,9 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import { createContext, PropsWithChildren, useContext } from "react"; import { pond } from "protobuf-ts/pond"; import { pondURL } from "./pond"; import { AxiosResponse } from "axios"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { or } from "utils"; export interface ITransactionAPIContext { diff --git a/src/providers/pond/usageAPI.tsx b/src/providers/pond/usageAPI.tsx index 92de655..4d9d516 100644 --- a/src/providers/pond/usageAPI.tsx +++ b/src/providers/pond/usageAPI.tsx @@ -1,6 +1,6 @@ -import { useHTTP } from "hooks"; +import { useHTTP } from "../http"; import moment from "moment"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; import { createContext, PropsWithChildren, useContext } from "react"; import { pondURL } from "./pond"; diff --git a/src/providers/pond/userAPI.tsx b/src/providers/pond/userAPI.tsx index 0d33b2e..dfd2529 100644 --- a/src/providers/pond/userAPI.tsx +++ b/src/providers/pond/userAPI.tsx @@ -1,10 +1,10 @@ -// import { useHTTP } from "hooks"; +// import { useHTTP } from "../http"; // import { Scope, User } from "models"; // import { pond } from "protobuf-ts/pond"; import { createContext, PropsWithChildren, useContext } from "react"; import { objectQueryParams, pondURL } from "./pond"; // import { or } from "utils"; -import { useGlobalState } from "providers"; +import { useGlobalState } from "../StateContainer"; // import { AxiosResponse } from "axios"; import { useHTTP } from "../http"; import { AxiosResponse } from "axios"; diff --git a/src/services/restAPI.js b/src/services/restAPI.js index ba073f4..8539729 100644 --- a/src/services/restAPI.js +++ b/src/services/restAPI.js @@ -1,4 +1,4 @@ -import * as axios from "axios"; +import axios from "axios"; export var defaultOptions = { headers: { diff --git a/src/teams/TeamList.tsx b/src/teams/TeamList.tsx index 7742033..f45262c 100644 --- a/src/teams/TeamList.tsx +++ b/src/teams/TeamList.tsx @@ -12,7 +12,8 @@ import { Grid2, } from "@mui/material"; import { pond } from "protobuf-ts/pond"; -import { useGlobalState, useSnackbar, useTeamAPI, useUserAPI } from "providers"; +import { useGlobalState, useSnackbar, useUserAPI } from "providers"; +import { useTeamAPI } from "providers/pond/teamAPI"; import { Team, teamScope } from "models"; import { useNavigate } from "react-router"; import { cloneDeep } from "lodash"; diff --git a/src/teams/TeamSettings.tsx b/src/teams/TeamSettings.tsx index 8e99e7e..87f47db 100644 --- a/src/teams/TeamSettings.tsx +++ b/src/teams/TeamSettings.tsx @@ -14,7 +14,8 @@ import { import ResponsiveDialog from "common/ResponsiveDialog"; import { Team } from "models"; import { pond } from "protobuf-ts/pond"; -import { useSnackbar, useTeamAPI } from "providers"; +import { useSnackbar } from "providers"; +import { useTeamAPI } from "providers/pond/teamAPI"; import React, { useEffect, useState } from "react"; import DeleteButton from "common/DeleteButton"; import { userRoleFromPermissions } from "pbHelpers/User";