Skip to content

Commit

Permalink
blog: fix lazy load images (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
lambrian authored Dec 17, 2024
1 parent ae04315 commit 4ee1bf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions brianl.am/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ body ::selection {
gap: 12px;
align-self: stretch;
flex-wrap: wrap;
height: 1000px;
}

.cover-container {
Expand Down
4 changes: 3 additions & 1 deletion brianl.am/src/PhotoEssay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ const PhotoRow = (props: { photos: string[] }) => {
[props, dimensions2, width]
)

const photosetHeight = scaledDimensions?.final_scaled_heights[0]

return (
<div className="photoset" ref={ref}>
<div className="photoset" ref={ref} style={{ height: photosetHeight }}>
{props.photos.map((photo: string, i: number) => {
return (
<Img
Expand Down

0 comments on commit 4ee1bf7

Please sign in to comment.