Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ergoplatform/ergoweb
Browse files Browse the repository at this point in the history
  • Loading branch information
deadit committed Nov 26, 2022
2 parents 3e2cea4 + e32eb25 commit cfd60f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pages/blog/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ export default function Post(props: Props) {
const { locale } = useRouter();
let hasImage = false;
let imageUrl = '';

if (props.post.attributes.blogPhoto?.length > 0) {
hasImage = true;
imageUrl = 'https://storage.googleapis.com/ergo-cms-media' + props.post.attributes.blogPhoto;
}
if (props.post.attributes.image.data) {
hasImage = true;
imageUrl = props.post.attributes.image.data.attributes.formats.large.url;
imageUrl = props.post.attributes.image.data.attributes.url;
}

return (
Expand Down
2 changes: 1 addition & 1 deletion pages/news/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Post(props: Props) {
}
if (props.post.attributes.image.data) {
hasImage = true;
imageUrl = props.post.attributes.image.data.attributes.formats.large.url;
imageUrl = props.post.attributes.image.data.attributes.url;
}

return (
Expand Down

0 comments on commit cfd60f6

Please sign in to comment.