mirror of
https://github.com/ruisaraiva19/favycon.git
synced 2026-09-12 19:51:07 +05:00
refactor(types): update types for new dependencies versions
This commit is contained in:
parent
a8fd0ad8aa
commit
d00cd0e2d7
@ -22,7 +22,14 @@
|
||||
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||
"@typescript-eslint/member-delimiter-style": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/ban-ts-ignore": "off"
|
||||
"@typescript-eslint/ban-ts-ignore": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
"@typescript-eslint/no-extra-semi": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
"@typescript-eslint/no-unsafe-return": "off",
|
||||
"@typescript-eslint/no-floating-promises": "off",
|
||||
"@typescript-eslint/no-unsafe-member-access": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
||||
@ -17,12 +17,12 @@ const FavyconError = ({ error, clearError }: FavyconErrorProps) => {
|
||||
if (error) {
|
||||
let endTimeout: number
|
||||
setShowError(true)
|
||||
const errorTimeout = setTimeout(() => {
|
||||
const errorTimeout = window.setTimeout(() => {
|
||||
setShowError(false)
|
||||
endTimeout = setTimeout(() => {
|
||||
endTimeout = window.setTimeout(() => {
|
||||
clearError()
|
||||
}, 300) as any
|
||||
}, 5300) as any
|
||||
}, 300)
|
||||
}, 5300)
|
||||
return () => {
|
||||
clearTimeout(errorTimeout)
|
||||
clearTimeout(endTimeout)
|
||||
|
||||
@ -30,11 +30,7 @@ const LazyImage = ({ src, srcRetina = src, srcPlaceholder = src, alt, aspectRati
|
||||
{({ imageProps, imageState, ref }) => {
|
||||
const loaded = imageState === ImageState.LoadSuccess
|
||||
return (
|
||||
<div
|
||||
className={styles.root}
|
||||
ref={ref}
|
||||
style={{ paddingBottom: `${(height / width) * 100 + '%'}` }}
|
||||
{...props}>
|
||||
<div className={styles.root} ref={ref} style={{ paddingBottom: `${(height / width) * 100}%` }} {...props}>
|
||||
<img
|
||||
className={styles.placeholder}
|
||||
src={srcPlaceholder}
|
||||
|
||||
@ -104,6 +104,6 @@ export default async (req: MulterApiRequest, res: NextApiResponse) => {
|
||||
break
|
||||
default:
|
||||
res.setHeader('Allow', ['POST'])
|
||||
res.status(405).end(`Method ${req.method} Not Allowed`)
|
||||
res.status(405).end(`Method ${req.method || ''} Not Allowed`)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user