Skip to content

Commit

Permalink
remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl-OW committed Sep 30, 2024
1 parent 900b004 commit c2b1420
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/main/resources/react4xp/_entries/ArticleArchive.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react'
import React, { useState } from 'react'
import { Divider, Button, LeadParagraph, Paragraph, Link } from '@statisticsnorway/ssb-component-library'
import { Container, Row, Col } from 'react-bootstrap'
import { ChevronDown } from 'react-feather'
Expand Down Expand Up @@ -29,13 +29,9 @@ function ArticleArchive(props: ArticleArchiveProps) {
const [totalCount, setTotalCount] = useState(firstArticles.total)
const [loading, setLoading] = useState<boolean>()

useEffect(() => {
if (image) {
const { imageMobileUrl, imageTabletUrl } = generateImageUrls(image)
console.log({ imageMobileUrl, imageTabletUrl })
console.log(image)
}
}, [image])
const { imageMobileUrl, imageTabletUrl } = image
? generateImageUrls(image)
: { imageMobileUrl: '', imageTabletUrl: '' }

function fetchArticles() {
setLoading(true)
Expand Down Expand Up @@ -135,9 +131,7 @@ function ArticleArchive(props: ArticleArchiveProps) {
<Col className='col-12 d-flex justify-content-center'>
<img
src={image}
srcSet={`${generateImageUrls(image).imageMobileUrl} 600w,
${generateImageUrls(image).imageTabletUrl} 992w,
${image} 1180w`}
srcSet={`${imageMobileUrl} 600w, ${imageTabletUrl} 992w, ${image} 1180w`}
sizes='(max-width: 600px) 600px, (max-width: 992px) 992px, 1180px'
alt={imageAltText}
loading='lazy'
Expand Down

0 comments on commit c2b1420

Please sign in to comment.