Skip to content

Commit

Permalink
[field] Fix up some imports with the components being moved from [des…
Browse files Browse the repository at this point in the history
…k-tool]
  • Loading branch information
skogsmaskin authored and rexxars committed Oct 6, 2020
1 parent abd547b commit dbce776
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
1 change: 1 addition & 0 deletions packages/@sanity/field/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@sanity/base": "1.150.3",
"@sanity/diff": "1.150.1",
"@sanity/react-hooks": "1.150.4",
"@sanity/block-content-to-react": "^2.0.7",
"date-fns": "^1.29.0",
"sanity-diff-patch": "^1.0.7"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PortableText from '@sanity/block-content-to-react'
import {DiffComponent, ObjectDiff, ObjectSchemaType} from '@sanity/field/diff'
import {DiffComponent, ObjectDiff, ObjectSchemaType} from '../../index'

import Blockquote from './previews/Blockquote'
import Decorator from './previews/Decorator'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import React from 'react'
import {
AnnotatedStringDiff,
ArrayDiff,
ObjectDiff,
ObjectSchemaType,
StringDiff
} from '@sanity/field/diff'
import {AnnotatedStringDiff, ArrayDiff, ObjectDiff, ObjectSchemaType, StringDiff} from '../../index'
import {startCase} from 'lodash'
import {ChildMap, PortableTextBlock, PortableTextChild} from './types'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ArrayDiff, ObjectDiff} from '@sanity/field/diff'
import {ReactElement} from 'react'
import {ArrayDiff, ObjectDiff} from '../../index'
import {ReactNode} from 'react'

export type PortableTextBlock = {
_key: string
Expand All @@ -18,9 +18,9 @@ export type PortableTextChild = {
export type ChildMap = Record<
string,
{
annotation: React.ReactNode | undefined
annotation: ReactNode | undefined
child: PortableTextChild
diffs: ObjectDiff[] | ArrayDiff[]
summary: React.ReactNode[]
summary: ReactNode[]
}
>
2 changes: 1 addition & 1 deletion packages/@sanity/field/src/diff/resolve/diffResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const diffResolver: DiffComponentResolver = function diffResolver({schema
return SlugFieldDiff
}

if (isPTSchemaType(schemaType)) {
if (schemaType.jsonType === 'object' && isPTSchemaType(schemaType)) {
return PTDiff
}

Expand Down

0 comments on commit dbce776

Please sign in to comment.