style: import type

This commit is contained in:
Maël Gangloff
2024-12-31 13:55:42 +01:00
parent 28462683f9
commit b68ce10614
40 changed files with 104 additions and 75 deletions

View File

@@ -4,7 +4,8 @@ import React, {useEffect, useState} from 'react'
import {ApartmentOutlined} from '@ant-design/icons'
import '@xyflow/react/dist/style.css'
import {Background, Controls, Edge, MiniMap, Node, ReactFlow, useEdgesState, useNodesState} from '@xyflow/react'
import type { Edge, Node} from '@xyflow/react'
import {Background, Controls, MiniMap, ReactFlow, useEdgesState, useNodesState} from '@xyflow/react'
import {getWatchlist} from '../../../../utils/api'
import {getLayoutedElements} from './getLayoutedElements'
import {watchlistToNodes} from './watchlistToNodes'

View File

@@ -1,5 +1,6 @@
import dagre from 'dagre'
import {Edge, Node, Position} from '@xyflow/react'
import type {Edge, Node} from '@xyflow/react'
import { Position} from '@xyflow/react'
export const getLayoutedElements = (nodes: Node[], edges: Edge[], direction = 'TB') => {
const dagreGraph = new dagre.graphlib.Graph()

View File

@@ -1,9 +1,9 @@
import {Domain, Watchlist} from '../../../../utils/api'
import type {Domain, Watchlist} from '../../../../utils/api'
import {rdapRoleTranslation} from '../../../../utils/functions/rdapTranslation'
import {t} from 'ttag'
import {rolesToColor} from '../../../../utils/functions/rolesToColor'
import {Edge} from '@xyflow/react'
import type {Edge} from '@xyflow/react'
export function domainEntitiesToEdges(d: Domain, withRegistrar = false): Edge[] {
const rdapRoleTranslated = rdapRoleTranslation()

View File

@@ -1,9 +1,9 @@
import {Domain, Nameserver, Tld, Watchlist} from '../../../../utils/api'
import type {Domain, Nameserver, Tld, Watchlist} from '../../../../utils/api'
import React from 'react'
import {t} from 'ttag'
import {entityToName} from '../../../../utils/functions/entityToName'
import {Node} from '@xyflow/react'
import type {Node} from '@xyflow/react'
export const domainToNode = (d: Domain): Node => ({
id: d.ldhName,