Fix lint errors for src/bg/main.tsx

This commit is contained in:
zeon-neon[bot] 2024-06-18 00:48:59 +00:00 committed by GitHub
parent 43c06bdb8a
commit cd6a228134
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
import { useEffect, useRef } from "react";
import "./style.css";
import { useEffect, useRef } from 'react'
import './style.css'
export default function Background () {
const domRef = useRef(null)
@ -8,23 +8,23 @@ const domRef = useRef(null)
const inter = setInterval(() => {
if (document.hasFocus() && domRef.current) {
// @ts-expect-error
domRef.current.style.filter = "blur(10px)"
domRef.current.style.filter = 'blur(10px)'
} else {
// @ts-ignore
domRef.current.style.filter = "";
domRef.current.style.filter = ''
}
})
return () => {
clearInterval(inter)
}
}, []);
}, [])
return (
<div style={{ filter: 'blur(10px)' }} ref={domRef}>
<ul className="background">
<ul className='background'>
{new Array(49).join('.').split('.').map((_, i) => {
return <li key={i} className={i % 2 === 0 ? "bg-effect" : ""}></li>
return <li key={i} className={i % 2 === 0 ? 'bg-effect' : ''} />
})}
</ul>
</div>