import React from "react";
import Script from "next/script";
import "../styles/globals.css";
import "antd/dist/antd.css";
import { ConfigProvider } from "antd";
import zhCN from "antd/lib/locale-provider/zh_CN";
import moment from "moment";
import "moment/locale/zh-cn";
moment.locale("zh-cn");
function MyApp({ Component, pageProps }) {
  return (
    <ConfigProvider locale={zhCN}>
      <React.Fragment>
        <Script src="/config.js" strategy="beforeInteractive"></Script>
        <Component {...pageProps} />
        <style jsx global>{`
          @font-face {
            font-family: "RubikRegular";
            src: url("/font/rubik/Rubik-Regular.ttf");
          }
          @font-face {
            font-family: "PingFang";
            src: url("/font/PingFang SC Regular.ttf");
          }
          body {
            font-family: "PingFang";
          }
        `}</style>
      </React.Fragment>
    </ConfigProvider>
  );
}

export default MyApp;
