Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Jun 18, 2020
1 parent ea2bd90 commit 43a8b42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/components/manage/Blocks/DetailedLink/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const Edit = props => {
...props.data,
detailedLink: {
...props.data.detailedLink,
...props.pages[state.link.value],
title: props.pages[state.link.value].title,
description: props.pages[state.link.value].description,
path: state.link.value,
},
});
}
Expand All @@ -48,7 +50,9 @@ const Edit = props => {
...props.data,
detailedLink: {
...props.data.detailedLink,
...link,
title: link.text,
description: link.description,
path: link.value,
},
});
}}
Expand Down
4 changes: 2 additions & 2 deletions src/components/manage/Blocks/DetailedLink/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const View = props => {
{(props.data?.detailedLink && (
<div>
<div className="detailed-link-block-item-title">
{props.data.detailedLink.title || props.data.detailedLink.text}
{props.data.detailedLink.title || ''}
</div>
<p>{props.data.detailedLink.description || ''}</p>
<Link
className="detailed-link-block"
onClick={e => e.preventDefault}
to={getPath(props.data.detailedLink.value)}
to={getPath(props.data.detailedLink.path)}
>
<Button basic>Read more</Button>
</Link>
Expand Down

0 comments on commit 43a8b42

Please sign in to comment.