Refactor: Remove unused imports across multiple frontend components (#6232)
* refactor: Remove unused imports across multiple frontend components * update outdated components --------- Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
parent
45bac3714a
commit
b8346a0afa
50 changed files with 161 additions and 209 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useMemo } from "react";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import { getNodeOutputColors } from "../../../helpers/get-node-output-colors";
|
||||
import { getNodeOutputColorsName } from "../../../helpers/get-node-output-colors-name";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
import ForwardedIconComponent from "../../components/common/genericIconComponent";
|
||||
import Checkmark from "../../components/ui/checkmark";
|
||||
import Loading from "../../components/ui/loading";
|
||||
import Xmark from "../../components/ui/xmark";
|
||||
import { BuildStatus } from "../../constants/enums";
|
||||
import { VertexBuildTypeAPI } from "../../types/api";
|
||||
|
||||
const useIconStatus = (buildStatus: BuildStatus | undefined) => {
|
||||
const conditionError = buildStatus === BuildStatus.ERROR;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import {
|
|||
CardHeader,
|
||||
CardTitle,
|
||||
} from "../../ui/card";
|
||||
import Loading from "../../ui/loading";
|
||||
import IconComponent from "../genericIconComponent";
|
||||
import ShadTooltip from "../shadTooltipComponent";
|
||||
import useDataEffect from "./hooks/use-data-effect";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import BaseModal from "../../../modals/baseModal";
|
||||
import { fetchErrorComponentType } from "../../../types/components";
|
||||
import Loading from "../../ui/loading";
|
||||
import IconComponent from "../genericIconComponent";
|
||||
|
||||
export default function TimeoutErrorComponent({
|
||||
message,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import ForwardedIconComponent from "@/components/common/genericIconComponent";
|
||||
import { useLogout } from "@/controllers/API/queries/auth";
|
||||
import { CustomFeedbackDialog } from "@/customization/components/custom-feedback-dialog";
|
||||
import { CustomHeaderMenuItemsTitle } from "@/customization/components/custom-header-menu-items-title";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { FlowType } from "@/types/flow";
|
||||
import { storeComponent } from "../../../../../types/store";
|
||||
import { cn } from "../../../../../utils/utils";
|
||||
import ForwardedIconComponent from "../../../../common/genericIconComponent";
|
||||
import { Card, CardHeader, CardTitle } from "../../../../ui/card";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { FlowType } from "@/types/flow";
|
|||
import { useCallback } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import useFlowsManagerStore from "../../../../stores/flowsManagerStore";
|
||||
import { storeComponent } from "../../../../types/store";
|
||||
import DragCardComponent from "../components/dragCardComponent";
|
||||
|
||||
const useDragStart = (data: FlowType) => {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import { getInputsAndOutputs } from "../../../utils/storeUtils";
|
|||
import { cn } from "../../../utils/utils";
|
||||
import IconComponent from "../../common/genericIconComponent";
|
||||
import ShadTooltip from "../../common/shadTooltipComponent";
|
||||
import { Button } from "../../ui/button";
|
||||
import {
|
||||
Card,
|
||||
CardDescription,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { useState } from "react";
|
||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||
import { tomorrow } from "react-syntax-highlighter/dist/cjs/styles/prism";
|
||||
import { useDarkStore } from "../../../stores/darkStore";
|
||||
import IconComponent from "../../common/genericIconComponent";
|
||||
import { Button } from "../../ui/button";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
|||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "../../../../ui/input";
|
||||
import { ButtonInputList } from "./components/button-input-list";
|
||||
import { DropdownMenuInputList } from "./components/dropdown-menu";
|
||||
|
||||
import { GRADIENT_CLASS } from "@/constants/constants";
|
||||
import { cn } from "../../../../../utils/utils";
|
||||
|
|
@ -139,7 +138,7 @@ export default function InputListComponent({
|
|||
</div>
|
||||
)}
|
||||
|
||||
{/*
|
||||
{/*
|
||||
We will add this back in a future release
|
||||
{!disabled && (
|
||||
<DropdownMenuInputList
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
} from "@/utils/reactflowUtils";
|
||||
import { cn } from "@/utils/utils";
|
||||
import { cloneDeep } from "lodash";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import IconComponent from "../../../../common/genericIconComponent";
|
||||
|
||||
const KeypairListComponent = ({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { PopoverAnchor } from "@radix-ui/react-popover";
|
||||
import Fuse from "fuse.js";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { cn } from "../../../../../utils/utils";
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import {
|
|||
memo,
|
||||
useCallback,
|
||||
useContext,
|
||||
useEffect,
|
||||
useId,
|
||||
useMemo,
|
||||
} from "react";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
TargetAndTransition,
|
||||
Variants,
|
||||
} from "framer-motion";
|
||||
import React, { ReactElement } from "react";
|
||||
import React from "react";
|
||||
|
||||
type PresetType = "blur" | "shake" | "scale" | "fade" | "slide";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,11 @@ import { AxiosRequestConfig, AxiosResponse } from "axios";
|
|||
import { BASE_URL_API } from "../../constants/constants";
|
||||
import { api } from "../../controllers/API/api";
|
||||
import {
|
||||
Component,
|
||||
VertexBuildTypeAPI,
|
||||
VerticesOrderTypeAPI,
|
||||
} from "../../types/api/index";
|
||||
import { FlowStyleType, FlowType } from "../../types/flow";
|
||||
import { StoreComponentResponse } from "../../types/store";
|
||||
import { FlowPoolType } from "../../types/zustand/flow";
|
||||
|
||||
const GITHUB_API_URL = "https://api.github.com";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
changeUser,
|
||||
resetPasswordType,
|
||||
useMutationFunctionType,
|
||||
} from "@/types/api";
|
||||
import { resetPasswordType, useMutationFunctionType } from "@/types/api";
|
||||
import { UseMutationResult } from "@tanstack/react-query";
|
||||
import { api } from "../../api";
|
||||
import { getURL } from "../../helpers/constants";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { LoginType, changeUser, useMutationFunctionType } from "@/types/api";
|
||||
import { LoginType, useMutationFunctionType } from "@/types/api";
|
||||
import { UseMutationResult } from "@tanstack/react-query";
|
||||
import { api } from "../../api";
|
||||
import { getURL } from "../../helpers/constants";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
import { keepPreviousData } from "@tanstack/react-query";
|
||||
import {
|
||||
useMutationFunctionType,
|
||||
useQueryFunctionType,
|
||||
} from "../../../../types/api";
|
||||
import { api } from "../../api";
|
||||
import { useMutationFunctionType } from "../../../../types/api";
|
||||
import { getURL } from "../../helpers/constants";
|
||||
import { UseRequestProcessor } from "../../services/request-processor";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { useGlobalVariablesStore } from "@/stores/globalVariablesStore/globalVar
|
|||
import getUnavailableFields from "@/stores/globalVariablesStore/utils/get-unavailable-fields";
|
||||
import { useMutationFunctionType } from "@/types/api";
|
||||
import { GlobalVariable } from "@/types/global_variables";
|
||||
import { UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
|
||||
import { UseMutationResult } from "@tanstack/react-query";
|
||||
import { api } from "../../api";
|
||||
import { getURL } from "../../helpers/constants";
|
||||
import { UseRequestProcessor } from "../../services/request-processor";
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue