Skip to content

Commit

Permalink
Only show placeholder image if offline
Browse files Browse the repository at this point in the history
This means we won't show it when initially loading the app
  • Loading branch information
microbit-robert committed Apr 26, 2024
1 parent 904e486 commit e85920e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/documentation/common/DocumentationContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ const serializers = {
.width(300)
.fit("max")
.url()}
ignoreFallback={navigator.onLine}
fallback={<OfflineImageFallback {...imageProps} />}
alt={props.node.alt}
{...imageProps}
Expand Down
1 change: 1 addition & 0 deletions src/documentation/ideas/IdeaCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const IdeaCard = ({ name, image, isV2Only, onClick }: IdeaCardProps) => {
>
<Image
src={imageUrlBuilder.image(image.asset).width(550).url()}
ignoreFallback={navigator.onLine}
fallback={<OfflineImageFallback useIcon {...imageProps} />}
alt=""
{...imageProps}
Expand Down
1 change: 1 addition & 0 deletions src/documentation/ideas/IdeasDocumentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const ActiveLevel = ({
.image(activeIdea.image.asset)
.fit("max")
.url()}
ignoreFallback={navigator.onLine}
fallback={<OfflineImageFallback {...imageProps} />}
alt=""
{...imageProps}
Expand Down

0 comments on commit e85920e

Please sign in to comment.