Skip to content

Commit

Permalink
Bump charterafrica version to 0.1.30
Browse files Browse the repository at this point in the history
Use media.url instead of media.src on spotlight
  • Loading branch information
koechkevin committed Jul 16, 2024
1 parent 97f48fc commit b6a23b9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/charterafrica/contrib/dokku/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM codeforafrica/charterafrica-ui:0.1.29
FROM codeforafrica/charterafrica-ui:0.1.30
2 changes: 1 addition & 1 deletion apps/charterafrica/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "charterafrica",
"version": "0.1.29",
"version": "0.1.30",
"private": true,
"author": "Code for Africa <[email protected]>",
"description": "This is the official code for https://charter.africa site",
Expand Down
2 changes: 1 addition & 1 deletion apps/charterafrica/src/components/Spotlight/Spotlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const Spotlight = React.forwardRef(function Spotlight(props, ref) {
<CardMedia
alt={item.title}
component="img"
src={item.image.src}
src={item.image.url}
sx={{
height: {
xs: "auto",
Expand Down
8 changes: 8 additions & 0 deletions apps/charterafrica/src/payload/collections/Media.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ const Media = {
required: true,
},
],
hooks: {
afterRead: [
({ doc }) => ({
...doc,
alt: doc.alt || doc.filename,
}),
],
},
};

export default Media;

0 comments on commit b6a23b9

Please sign in to comment.