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

clippingkk / web / #1207

21 Mar 2026 03:39PM UTC coverage: 0.518% (-0.004%) from 0.522%
#1207

push

web-flow
Merge pull request #174 from clippingkk/refactor/migrate-eslint-prettier-to-oxlint-oxfmt

refactor(lint): migrate from ESLint + Prettier to oxlint + oxfmt

30 of 448 branches covered (6.7%)

Branch coverage included in aggregate %.

2 of 3517 new or added lines in 323 files covered. (0.06%)

1 existing line in 1 file now uncovered.

147 of 33737 relevant lines covered (0.44%)

8.61 hits per line

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

0.0
/src/components/SimpleAnimation/HideUntilLoaded.tsx
1
'use client'
×
2
import type React from 'react'
×
3
import { useEffect, useState } from 'react'
×
4

×
5
type HideUntilLoadedProps = {
×
6
  imageToLoad: string
×
7
  children: React.ReactElement
×
8
}
×
9

×
10
// Inner component that resets via key prop when imageToLoad changes
×
NEW
11
function HideUntilLoadedInner({ imageToLoad, children }: HideUntilLoadedProps) {
×
12
  const [status, setStatus] = useState<'loading' | 'loaded' | 'error'>(
×
13
    'loading'
×
14
  )
×
15

×
16
  useEffect(() => {
×
17
    const img = document.createElement('img')
×
18
    img.onload = () => setStatus('loaded')
×
19
    img.onerror = () => setStatus('error')
×
20
    img.src = imageToLoad
×
21

×
22
    return () => {
×
23
      img.onload = null
×
24
      img.onerror = null
×
25
    }
×
26
  }, [imageToLoad])
×
27

×
28
  if (status === 'error') {
×
29
    return children
×
30
  }
×
31

×
32
  if (status === 'loading') {
×
33
    return null
×
34
  }
×
35

×
36
  return children
×
37
}
×
38

×
39
function HideUntilLoaded(props: HideUntilLoadedProps) {
×
40
  // Use key prop to reset component state when imageToLoad changes
×
41
  return <HideUntilLoadedInner key={props.imageToLoad} {...props} />
×
42
}
×
43

×
44
export default HideUntilLoaded
×
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