Skip to content

Commit 6e96000

Browse files
Render LQIP and photo credit. Remove logs.
1 parent c70ec7e commit 6e96000

File tree

5 files changed

+4
-2
lines changed

5 files changed

+4
-2
lines changed

web/components/PostImg.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ const PhotoCredit = styled.p`
2525
`
2626

2727
function PostImage(props) {
28-
console.log('PI props: ', props)
28+
// console.log('PI props: ', props)
2929
const [isLoaded, setIsLoaded] = useState(false);
3030
return (
3131
<PostImgContainer>
3232
<PostImg
3333
onLoad={() => setIsLoaded(true)}
34+
onBeforeUnload={() => setIsLoaded(false)}
3435
src={props.postImg.url}
3536
alt={`Image of ${props.postImg.description} by ${props.postImg.creditLine}`}
37+
// TODO: move these style tags to Styled Components?
3638
style={{ opacity: isLoaded ? 1 : 0 }}
3739
/>
3840

web/pages/posts/[slug].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const H3 = styled.h3`
104104

105105
function Post(props) {
106106
const [articleBtmPos, setArticleBtmPos] = useState(0)
107-
console.log('propsPost: ', props)
107+
// console.log('Post props: ', props)
108108

109109
useEffect(() => {
110110
const articleBottom = document.querySelector('article').getClientRects()[0].bottom
-2.23 MB
Binary file not shown.
-2.64 MB
Binary file not shown.
-1.5 MB
Binary file not shown.

0 commit comments

Comments
 (0)