• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IQSS / dataverse-frontend / 15049606369

15 May 2025 03:55PM UTC coverage: 97.932% (+0.5%) from 97.394%
15049606369

push

github

web-flow
Merge pull request #696 from IQSS/feat/690-featured-items-aspect-ratio-recommendations

Featured Items aspect ratio recommendations

3013 of 3153 branches covered (95.56%)

Branch coverage included in aggregate %.

37 of 37 new or added lines in 2 files covered. (100.0%)

24 existing lines in 12 files now uncovered.

6602 of 6665 relevant lines covered (99.05%)

18892.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/sections/file/useFile.tsx
1
import { useEffect, useState } from 'react'
2
import { FileRepository } from '../../files/domain/repositories/FileRepository'
3
import { getFileById } from '../../files/domain/useCases/getFileById'
4
import { File } from '../../files/domain/models/File'
5

6
export function useFile(repository: FileRepository, id: number, datasetVersionNumber?: string) {
224✔
7
  const [file, setFile] = useState<File>()
224✔
8
  const [isLoading, setIsLoading] = useState<boolean>(true)
224✔
9

10
  useEffect(() => {
224✔
11
    setIsLoading(true)
83✔
12

13
    getFileById(repository, id, datasetVersionNumber)
83✔
14
      .then((file: File | undefined) => {
15
        setFile(file)
73✔
16
        setIsLoading(false)
73✔
17
      })
18
      .catch(() => {
UNCOV
19
        console.error('There was an error getting the file')
5✔
UNCOV
20
        setIsLoading(false)
5✔
21
      })
22
  }, [repository, id, datasetVersionNumber])
23

24
  return {
224✔
25
    file,
26
    isLoading
27
  }
28
}
246✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc