fixed compilation warnings caused by lazy loading modules

This commit is contained in:
Carter 2026-05-19 13:25:11 -06:00
parent 2d00070130
commit 13346403e5
47 changed files with 85 additions and 76 deletions

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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 {

View file

@ -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<AxiosResponse<pond.AddBinYardResponse>>;

View file

@ -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";

View file

@ -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 {

View file

@ -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: (

View file

@ -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";

View file

@ -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";

View file

@ -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

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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: (

View file

@ -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 {

View file

@ -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: (

View file

@ -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 {

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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: (

View file

@ -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";

View file

@ -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: (

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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<AxiosResponse<pond.AddTeamResponse>>;

View file

@ -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: (

View file

@ -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 {

View file

@ -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";

View file

@ -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";

View file

@ -1,4 +1,4 @@
import * as axios from "axios";
import axios from "axios";
export var defaultOptions = {
headers: {

View file

@ -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";

View file

@ -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";