Skip to content

Commit

Permalink
fix: fix component imports
Browse files Browse the repository at this point in the history
  • Loading branch information
cngonzalez committed Apr 4, 2024
1 parent 480086e commit 266bec1
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
} from '@sanity/portable-text-editor'
import {isKeySegment} from '@sanity/types'
import {memo, useCallback, useMemo} from 'react'
import {useTranslation} from 'react-i18next'

import {type PopoverProps} from '../../../../../ui-components'
import {CollapseMenu, CollapseMenuButton} from '../../../../components/collapseMenu'
import {ContextMenuButton} from '../../../../components/contextMenuButton'
import {useTranslation} from '../../../../i18n'
import {getActionIcon} from './helpers'
import {useActiveActionKeys, useFocusBlock} from './hooks'
import {type PTEToolbarAction, type PTEToolbarActionGroup} from './types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import {purple, yellow} from '@sanity/color'
import {BoltIcon} from '@sanity/icons'
import {Card, Text} from '@sanity/ui'
import {forwardRef, type Ref} from 'react'
import {useTranslation} from 'react-i18next'
import {styled} from 'styled-components'

import {Button} from '../../../../../ui-components'
import {useTranslation} from '../../../../i18n'

const CenteredStroke = styled.div`
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {SearchIcon} from '@sanity/icons'
import {type ForwardedRef, forwardRef} from 'react'
import {useTranslation} from 'react-i18next'

import {Button} from '../../../../../ui-components'
import {useTranslation} from '../../../../i18n'
import {GLOBAL_SEARCH_KEY, GLOBAL_SEARCH_KEY_MODIFIER} from './constants'

interface SearchButtonProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {AddCommentIcon} from '@sanity/icons'
import {useClickOutside} from '@sanity/ui'
import {motion, type Variants} from 'framer-motion'
import {useState} from 'react'
//when comments are moved into core, we should change this to a local import
//eslint-disable-next-line @sanity/i18n/no-i18next-import
import {useTranslation} from 'react-i18next'
import {styled} from 'styled-components'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {LinkRemovedIcon} from '@sanity/icons'
import {isPortableTextTextBlock} from '@sanity/types'
import {Box, Flex, Stack, Text, type Theme} from '@sanity/ui'
import {useMemo} from 'react'
//when comments are moved into core, we should change this to a local import
//eslint-disable-next-line @sanity/i18n/no-i18next-import
import {useTranslation} from 'react-i18next'
import {css, styled} from 'styled-components'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import {
} from '@sanity/ui'
import isHotkey from 'is-hotkey'
import {useCallback, useMemo, useState} from 'react'
import {useTranslation} from 'react-i18next'
import {
ChangeConnectorRoot,
type DocumentFieldActionNode,
type DocumentInspectorMenuItem,
FieldActionsProvider,
FieldActionsResolver,
useTranslation,
useZIndex,
} from 'sanity'
import {type Path} from 'sanity-diff-patch'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {type ObjectSchemaType} from '@sanity/types'
import {Heading, Stack, Text} from '@sanity/ui'
import {useTranslation} from 'react-i18next'
import {useTranslation} from 'sanity'
import {css, styled} from 'styled-components'

import {structureLocaleNamespace} from '../../../../i18n'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {AddIcon} from '@sanity/icons'
import {Box, Flex, Stack, Text} from '@sanity/ui'
import {useCallback} from 'react'
//when comments are moved into core, we should change this to a local import
//eslint-disable-next-line @sanity/i18n/no-i18next-import
import {useTranslation} from 'react-i18next'
import {styled} from 'styled-components'

Expand Down
1 change: 1 addition & 0 deletions packages/sanity/src/ui-components/dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '@sanity/ui'
import type * as React from 'react'
import {type ComponentProps, forwardRef} from 'react'
//eslint-disable-next-line @sanity/i18n/no-i18next-import -- avoiding a circular import
import {useTranslation} from 'react-i18next'

/** @internal */
Expand Down

0 comments on commit 266bec1

Please sign in to comment.