mirror of https://github.com/sunface/rust-course
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.3 KiB
42 lines
1.3 KiB
import { trackPageview } from "analytics/track-event"
|
|
import { DefaultSeo } from "next-seo"
|
|
import Head from "next/head"
|
|
import Router from "next/router"
|
|
import React from "react"
|
|
import { ChakraProvider } from "@chakra-ui/react"
|
|
import theme from "theme"
|
|
import FontFace from "src/components/font-face"
|
|
import { getSeo } from "utils/seo"
|
|
import GAScript from "analytics/ga-script"
|
|
import {initUIConfig} from 'configs/config'
|
|
|
|
Router.events.on("routeChangeComplete", (url) => {
|
|
trackPageview(url)
|
|
})
|
|
|
|
const App = ({ Component, pageProps }) => {
|
|
const seo = getSeo({ omitOpenGraphImage: false })
|
|
|
|
initUIConfig()
|
|
return (
|
|
<>
|
|
<Head>
|
|
<meta content="IE=edge" httpEquiv="X-UA-Compatible" />
|
|
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
<link rel="icon" type="image/png" sizes="96x96" href="/favicon.png" />
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://static.cloudflareinsights.com" />
|
|
<meta name="theme-color" content="#319795" />
|
|
</Head>
|
|
<DefaultSeo {...seo} />
|
|
<ChakraProvider theme={theme}>
|
|
<Component {...pageProps} />
|
|
</ChakraProvider>
|
|
<GAScript />
|
|
<FontFace />
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default App
|