mirror of
https://github.com/NeonGamerBot-QK/saahild.com.git
synced 2024-11-25 14:13:40 +00:00
Fix lint errors for src/bg/main.tsx
This commit is contained in:
parent
43c06bdb8a
commit
cd6a228134
1 changed files with 26 additions and 26 deletions
|
@ -1,5 +1,5 @@
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from 'react'
|
||||||
import "./style.css";
|
import './style.css'
|
||||||
|
|
||||||
export default function Background () {
|
export default function Background () {
|
||||||
const domRef = useRef(null)
|
const domRef = useRef(null)
|
||||||
|
@ -8,23 +8,23 @@ const domRef = useRef(null)
|
||||||
const inter = setInterval(() => {
|
const inter = setInterval(() => {
|
||||||
if (document.hasFocus() && domRef.current) {
|
if (document.hasFocus() && domRef.current) {
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
domRef.current.style.filter = "blur(10px)"
|
domRef.current.style.filter = 'blur(10px)'
|
||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
domRef.current.style.filter = "";
|
domRef.current.style.filter = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
clearInterval(inter)
|
clearInterval(inter)
|
||||||
}
|
}
|
||||||
}, []);
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ filter: 'blur(10px)' }} ref={domRef}>
|
<div style={{ filter: 'blur(10px)' }} ref={domRef}>
|
||||||
<ul className="background">
|
<ul className='background'>
|
||||||
{new Array(49).join('.').split('.').map((_, i) => {
|
{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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue