Skip to content

Commit

Permalink
rename link field to href to make it use the correct adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
jackahl committed Jan 22, 2024
1 parent 39e4a26 commit f5a5096
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions news/14.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rename "link" field to "href" to make it use the correct adapter
4 changes: 2 additions & 2 deletions src/components/Logo/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ const View = (props) => {
</Message>
)}
{logo &&
(isEditMode || !data.link?.length > 0 ? (
(isEditMode || !data.href?.length > 0 ? (
<img
src={flattenToAppURL(`${logo['@id']}/@@images/image/teaser`)}
alt="placeholder"
className="logo-image"
/>
) : (
<UniversalLink href={data.link?.[0]?.['@id']}>
<UniversalLink href={data.href?.[0]?.['@id']}>
<img
src={flattenToAppURL(`${logo['@id']}/@@images/image/teaser`)}
alt="placeholder"
Expand Down
6 changes: 3 additions & 3 deletions src/components/Logo/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const LogoBlockSchema = (props) => {
id: 'default',
title: 'Default',
fields: config.blocks.blocksConfig.logo.showDescriptionField
? ['logo', 'heading', 'description', 'link']
: ['logo', 'heading', 'link'],
? ['logo', 'heading', 'description', 'href']
: ['logo', 'heading', 'href'],
},
],
properties: {
Expand All @@ -57,7 +57,7 @@ export const LogoBlockSchema = (props) => {
title: props.intl.formatMessage(messages.description),
widget: 'text',
},
link: {
href: {
title: props.intl.formatMessage(messages.link),
widget: 'object_browser',
mode: 'link',
Expand Down

0 comments on commit f5a5096

Please sign in to comment.