Skip to content

Commit

Permalink
[field] PT: fix key bug, capitalize description
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin authored and rexxars committed Oct 6, 2020
1 parent 3c78eac commit 98556a0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useMemo} from 'react'
import {flatten, uniq} from 'lodash'
import {flatten, uniq, startCase} from 'lodash'
import {PortableTextBlock, PortableTextChild, PortableTextDiff} from '../types'
import {
ANNOTATION_SYMBOLS,
Expand Down Expand Up @@ -66,7 +66,7 @@ export default function PortableText(props: Props): JSX.Element {
annotation={textDiff.annotation}
as={textDiff.action === 'removed' ? 'del' : 'ins'}
tooltip={{
description: `${textDiff.action} empty text`
description: `${startCase(textDiff.action)} empty text`
}}
>
<span>{'\u21B2'}</span>
Expand Down Expand Up @@ -113,7 +113,7 @@ export default function PortableText(props: Props): JSX.Element {
}
returnedChildren.push(
<InlineObject
key={`inline-object-${child._key}`}
key={`inline-object-${originChild._key}`}
object={originChild}
diff={objectDiff}
schemaType={objectSchemaType}
Expand Down

0 comments on commit 98556a0

Please sign in to comment.