Skip to content

Commit 1240090

Browse files
authored
Combine duplicate imports (#893)
1 parent e88de0b commit 1240090

File tree

21 files changed

+75
-48
lines changed

21 files changed

+75
-48
lines changed

packages/graph-explorer/src/components/SelectField.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import type {
44
ForwardedRef,
55
ReactNode,
66
} from "react";
7-
import { forwardRef } from "react";
8-
import React from "react";
7+
import React, { forwardRef } from "react";
98
import { cn } from "@/utils";
109
import { Label } from "./Label";
1110
import {

packages/graph-explorer/src/components/Tabular/Tabular.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cn } from "@/utils";
1+
import { cn, getChildOfType } from "@/utils";
22
import {
33
ForwardedRef,
44
forwardRef,
@@ -13,7 +13,6 @@ import useDeepCompareEffect from "use-deep-compare-effect";
1313

1414
import { useWithTheme } from "@/core";
1515
import { useDeepMemo } from "@/hooks";
16-
import { getChildOfType } from "@/utils";
1716

1817
import {
1918
PaginationControl,

packages/graph-explorer/src/components/Workspace/Workspace.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { cn } from "@/utils";
1+
import { cn, getChildrenOfType } from "@/utils";
22
import type { PropsWithChildren, ReactElement } from "react";
33
import { useMemo } from "react";
4-
import { getChildrenOfType } from "@/utils";
54
import getChildOfType from "@/utils/getChildOfType";
65
import WorkspaceFooter from "./components/WorkspaceFooter";
76
import WorkspaceNavBar from "./components/WorkspaceNavBar";

packages/graph-explorer/src/components/Workspace/components/WorkspaceTopBar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { cn } from "@/utils";
1+
import { cn, groupChildrenByType } from "@/utils";
22
import type { PropsWithChildren, ReactElement } from "react";
33
import { useMemo } from "react";
4-
import { groupChildrenByType } from "@/utils";
54
import NavBarLogo from "./NavBarLogo";
65
import WorkspaceTopBarAdditionalControls from "./WorkspaceTopBarAdditionalControls";
76
import WorkspaceTopBarContent from "./WorkspaceTopBarContent";

packages/graph-explorer/src/connector/useGEFetchTypes.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ import {
22
ConfigurationContextProps,
33
EdgeTypeConfig,
44
VertexTypeConfig,
5+
Edge,
6+
EdgeId,
7+
Vertex,
8+
VertexId,
59
} from "@/core";
610
import { ConnectionConfig } from "@shared/types";
7-
import { Edge, EdgeId, Vertex, VertexId } from "@/core";
811

912
export type QueryOptions = RequestInit & {
1013
queryId?: string;

packages/graph-explorer/src/core/StateProvider/displayAttribute.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { Vertex, Edge } from "@/core";
1+
import { Vertex, Edge, AttributeConfig } from "@/core";
22
import { MISSING_DISPLAY_VALUE, formatDate } from "@/utils";
33
import { TextTransformer } from "@/hooks";
4-
import { AttributeConfig } from "@/core";
54

65
/** Represents an attribute's display information after all transformations have been applied. */
76
export type DisplayAttribute = {

packages/graph-explorer/src/core/StateProvider/displayEdge.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Edge } from "@/core";
1+
import { Edge, getRawId } from "@/core";
22
import {
33
createRandomEdge,
44
createRandomEdgeTypeConfig,
@@ -21,7 +21,6 @@ import { Schema } from "../ConfigurationProvider";
2121
import { MutableSnapshot } from "recoil";
2222
import { schemaAtom } from "./schema";
2323
import { QueryEngine } from "@shared/types";
24-
import { getRawId } from "@/core";
2524

2625
describe("useDisplayEdgeFromEdge", () => {
2726
it("should keep the same ID", () => {

packages/graph-explorer/src/core/StateProvider/displayEdge.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { Edge, EdgeId, getRawId, Vertex, VertexId } from "@/core";
2-
import { selector, selectorFamily, useRecoilValue } from "recoil";
3-
import { textTransformSelector } from "@/hooks";
41
import {
2+
Edge,
3+
EdgeId,
4+
getRawId,
5+
Vertex,
6+
VertexId,
57
DisplayEdgeTypeConfig,
68
displayEdgeTypeConfigSelector,
79
DisplayAttribute,
@@ -13,6 +15,8 @@ import {
1315
edgeSelector,
1416
edgeTypeAttributesSelector,
1517
} from "@/core";
18+
import { selector, selectorFamily, useRecoilValue } from "recoil";
19+
import { textTransformSelector } from "@/hooks";
1620
import {
1721
MISSING_DISPLAY_VALUE,
1822
RESERVED_ID_PROPERTY,

packages/graph-explorer/src/hooks/useExpandNode.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ import {
99
import { loggerSelector, useExplorer } from "@/core/connector";
1010
import { useRecoilValue } from "recoil";
1111
import { useMutation, useQueryClient } from "@tanstack/react-query";
12-
import { useFetchedNeighborsCallback, Vertex, VertexId } from "@/core";
12+
import {
13+
useFetchedNeighborsCallback,
14+
Vertex,
15+
VertexId,
16+
useNeighborsCallback,
17+
} from "@/core";
1318
import { createDisplayError } from "@/utils/createDisplayError";
14-
import { useNeighborsCallback } from "@/core";
1519
import { useAddToGraph } from "./useAddToGraph";
1620

1721
export type ExpandNodeFilters = Omit<

packages/graph-explorer/src/hooks/useNeighborsOptions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { useMemo } from "react";
2-
import { VertexId } from "@/core";
3-
import { SelectOption } from "@/components";
42
import {
3+
VertexId,
54
DisplayVertexTypeConfig,
65
useDisplayVertexTypeConfigs,
76
useNeighbors,
87
} from "@/core";
8+
import { SelectOption } from "@/components";
99

1010
export type NeighborOption = SelectOption & {
1111
config: DisplayVertexTypeConfig;

0 commit comments

Comments
 (0)