Ignore warnings

This commit is contained in:
cond0r 2022-07-13 14:35:32 +03:00
parent 130352b515
commit baf5b11eac
4 changed files with 10 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import { useRouter } from 'next/router'
import s from './I18nWidget.module.css' import s from './I18nWidget.module.css'
import { Cross, ChevronUp } from '@components/icons' import { Cross, ChevronUp } from '@components/icons'
import ClickOutside from '@lib/click-outside' import ClickOutside from '@lib/click-outside'
import Image from 'next/image'
interface LOCALE_DATA { interface LOCALE_DATA {
name: string name: string
img: { img: {
@ -50,12 +51,13 @@ const I18nWidget: FC = () => {
onClick={() => setDisplay(!display)} onClick={() => setDisplay(!display)}
> >
<button className={s.button} aria-label="Language selector"> <button className={s.button} aria-label="Language selector">
<img <Image
width="20" width="20"
height="20" height="20"
className="block mr-2 w-5" className="block mr-2 w-5"
src={`/${LOCALES_MAP[currentLocale].img.filename}`} src={`/${LOCALES_MAP[currentLocale].img.filename}`}
alt={LOCALES_MAP[currentLocale].img.alt} alt={LOCALES_MAP[currentLocale].img.alt}
unoptimized
/> />
{options && ( {options && (
<span className="cursor-pointer"> <span className="cursor-pointer">

View File

@ -195,6 +195,7 @@ export const UIProvider: FC<{ children?: ReactNode }> = (props) => {
setSidebarView, setSidebarView,
setUserAvatar, setUserAvatar,
}), }),
// eslint-disable-next-line react-hooks/exhaustive-deps
[state] [state]
) )

View File

@ -53,6 +53,7 @@ export default function FocusTrap({ children, focusFirst = false }: Props) {
return () => { return () => {
returnFocus() returnFocus()
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [root, children]) }, [root, children])
return React.createElement( return React.createElement(

View File

@ -35,6 +35,11 @@ module.exports = withCommerceConfig({
}, },
].filter(Boolean) ].filter(Boolean)
}, },
// Avoid Module not found: ESM packages (supports-color) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals
experimental: {
esmExternals: 'loose',
},
}) })
// Don't delete this console log, useful to see the commerce config in Vercel deployments // Don't delete this console log, useful to see the commerce config in Vercel deployments