1
0
mirror of https://github.com/vercel/commerce.git synced 2025-07-28 04:31:22 +00:00
Files
.vscode
assets
components
config
docs
framework
lib
pages
api
product
[...pages].tsx
_app.tsx
_document.tsx
blog.tsx
cart.tsx
index.tsx
orders.tsx
profile.tsx
search.tsx
wishlist.tsx
public
.editorconfig
.env.template
.gitignore
.prettierignore
.prettierrc
README.md
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package.json
postcss.config.js
tailwind.config.js
tsconfig.json
yarn.lock
commerce/pages/_app.tsx
2021-02-12 16:49:32 -03:00

30 lines
723 B
TypeScript

import '@assets/main.css'
import '@assets/chrome-bug.css'
import 'keen-slider/keen-slider.min.css'
import { FC, useEffect } from 'react'
import type { AppProps } from 'next/app'
import { Head } from '@components/common'
import { ManagedUIContext } from '@components/ui/context'
const Noop: FC = ({ children }) => <>{children}</>
export default function MyApp({ Component, pageProps }: AppProps) {
const Layout = (Component as any).Layout || Noop
useEffect(() => {
document.body.classList?.remove('loading')
}, [])
return (
<>
<Head />
<ManagedUIContext>
<Layout pageProps={pageProps}>
<Component {...pageProps} />
</Layout>
</ManagedUIContext>
</>
)
}