mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 23:16:59 +00:00
Ignore warnings
This commit is contained in:
parent
130352b515
commit
baf5b11eac
@ -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">
|
||||||
|
@ -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]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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(
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user