Commit 867629db authored by nickstiffler's avatar nickstiffler Committed by Yannis Barlas

fix(preview): show image changes in highlighting

parent f1081a07
......@@ -55,6 +55,8 @@ const Manuscript = props => {
title,
} = version
const previousImage = get(previousVersion, 'image')
const diffOn = showDiffFromProps && !!previousVersion
const [showDiff, setShowDiff] = useState(false)
......@@ -79,6 +81,13 @@ const Manuscript = props => {
image.url &&
(image.url.match(/^blob/) ? image.url : `/uploads/${image.url}`)
const previousImageSource =
previousImage &&
previousImage.url &&
(previousImage.url.match(/^blob/)
? previousImage.url
: `/uploads/${previousImage.url}`)
return (
<Wrapper>
{diffOn && (
......@@ -138,7 +147,7 @@ const Manuscript = props => {
<Image
name={image.name}
previousSource={get(previousVersion, 'image.source')}
previousSource={previousImageSource}
showDiff={showDiff}
showRemoved={showRemoved}
source={imageSource}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment