4
0
forked from crowetic/commerce
commerce/pages/_app.tsx

26 lines
573 B
TypeScript
Raw Normal View History

2020-10-15 11:45:01 -03:00
import '@assets/global.css'
import '@assets/tailwind.css'
import '@assets/utils.css'
import 'animate.css'
2020-10-01 21:30:08 -05:00
import { FC } from 'react'
2020-10-15 17:35:59 -03:00
2020-10-01 21:18:01 -05:00
import type { AppProps } from 'next/app'
2020-10-15 17:18:53 -03:00
2020-10-15 16:25:44 -03:00
import { CommerceProvider } from '@lib/bigcommerce'
2020-10-14 14:38:21 -03:00
2020-10-01 21:30:08 -05:00
const Noop: FC = ({ children }) => <>{children}</>
2020-10-01 21:18:01 -05:00
export default function MyApp({ Component, pageProps }: AppProps) {
2020-10-01 21:30:08 -05:00
const Layout = (Component as any).Layout || Noop
return (
2020-10-14 12:27:54 -03:00
<>
2020-10-15 16:25:44 -03:00
<CommerceProvider locale="en-us">
2020-10-15 17:18:53 -03:00
<Layout>
<Component {...pageProps} />
</Layout>
2020-10-15 16:25:44 -03:00
</CommerceProvider>
2020-10-14 12:27:54 -03:00
</>
2020-10-01 21:30:08 -05:00
)
2020-09-23 15:19:36 -03:00
}