From aae6223593d9fff3982fd4740c2ec1647a029da2 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Tue, 15 Aug 2023 19:43:43 -0300 Subject: [PATCH] code format --- src/frontend/src/contexts/SSEContext.tsx | 2 +- src/frontend/src/controllers/API/api.tsx | 1 - src/frontend/src/types/api/index.ts | 2 +- src/frontend/src/types/components/index.ts | 8 +++----- src/frontend/src/types/tabs/index.ts | 3 +-- src/frontend/src/types/typesContext/index.ts | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/frontend/src/contexts/SSEContext.tsx b/src/frontend/src/contexts/SSEContext.tsx index 13daef890..9db32310b 100644 --- a/src/frontend/src/contexts/SSEContext.tsx +++ b/src/frontend/src/contexts/SSEContext.tsx @@ -1,4 +1,4 @@ -import { ReactNode, createContext, useCallback, useContext, useState } from "react"; +import { createContext, useCallback, useContext, useState } from "react"; const initialValue = { updateSSEData: ({}) => {}, diff --git a/src/frontend/src/controllers/API/api.tsx b/src/frontend/src/controllers/API/api.tsx index 675511fcf..9d3d33ffe 100644 --- a/src/frontend/src/controllers/API/api.tsx +++ b/src/frontend/src/controllers/API/api.tsx @@ -2,7 +2,6 @@ import axios, { AxiosError, AxiosInstance } from "axios"; import { useContext, useEffect, useRef } from "react"; import { URL_EXCLUDED_FROM_ERROR_RETRIES } from "../../constants/constants"; import { alertContext } from "../../contexts/alertContext"; -import { errorsVarType } from "../../types/tabs"; // Create a new Axios instance const api: AxiosInstance = axios.create({ diff --git a/src/frontend/src/types/api/index.ts b/src/frontend/src/types/api/index.ts index fa2a0d22e..5a5701b2d 100644 --- a/src/frontend/src/types/api/index.ts +++ b/src/frontend/src/types/api/index.ts @@ -1,6 +1,6 @@ import { Edge, Node, Viewport } from "reactflow"; //kind and class are just representative names to represent the actual structure of the object received by the API -export type APIDataType = { [key: string]: APIKindType } +export type APIDataType = { [key: string]: APIKindType }; export type APIObjectType = { kind: APIKindType; [key: string]: APIKindType }; export type APIKindType = { class: APIClassType; [key: string]: APIClassType }; export type APITemplateType = { diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index e0ef84bde..2931c9af3 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -213,9 +213,7 @@ export type groupedObjType = { type test = { [char: string]: string; -} - - +}; export type tweakType = Array<{ [key: string]: { @@ -227,13 +225,13 @@ export type uniqueTweakType = { [key: string]: { [char: string]: string; } & FlowStyleType; -} +}; export type apiModalTweakType = { current: Array<{ [key: string]: { [char: string]: string | number; - } + }; }>; }; diff --git a/src/frontend/src/types/tabs/index.ts b/src/frontend/src/types/tabs/index.ts index 277d2a7a7..a87cdb35e 100644 --- a/src/frontend/src/types/tabs/index.ts +++ b/src/frontend/src/types/tabs/index.ts @@ -1,6 +1,5 @@ -import { Dispatch, SetStateAction } from "react"; -import { FlowType, TweaksType } from "../flow"; import { tweakType } from "../components"; +import { FlowType } from "../flow"; export type TabsContextType = { saveFlow: (flow: FlowType) => Promise; diff --git a/src/frontend/src/types/typesContext/index.ts b/src/frontend/src/types/typesContext/index.ts index 85b430a45..5c5d3daa6 100644 --- a/src/frontend/src/types/typesContext/index.ts +++ b/src/frontend/src/types/typesContext/index.ts @@ -1,6 +1,6 @@ import { Edge, Node, ReactFlowInstance } from "reactflow"; import { AlertItemType } from "../alerts"; -import { APIClassType, APIDataType, APIObjectType } from "../api"; +import { APIClassType, APIDataType } from "../api"; const types: { [char: string]: string } = {}; const template: { [char: string]: APIClassType } = {};