Skip to content

Commit

Permalink
fix: bug with missing attributes of images not loaded yet
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfrasco committed Feb 22, 2024
1 parent 5c7f27c commit 8cf513c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/client/src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ function HomepageInfoPanelTop() {
if (error) return <p>Error : {error.message}</p>;

const { Title, Subtitle, Image, Icon, ButtonText, ButtonLink } = data.homePageInfoPanelTop.data.attributes.InfoPanelA;
const imgUrl = import.meta.env.VITE_STRAPI_URL + Image.data.attributes.url;
const imgAlt = Image.data.attributes.alternativeText;
const iconUrl = import.meta.env.VITE_STRAPI_URL + Icon.data.attributes.url;
const iconAlt = Icon.data.attributes.alternativeText;
const imgUrl = import.meta.env.VITE_STRAPI_URL + Image.data?.attributes.url;
const imgAlt = Image.data?.attributes.alternativeText;
const iconUrl = import.meta.env.VITE_STRAPI_URL + Icon.data?.attributes.url;
const iconAlt = Icon.data?.attributes.alternativeText;

return (
<InfoPanelA
Expand Down

0 comments on commit 8cf513c

Please sign in to comment.