import { ConfigProvider } from "antd";
import { Analytics } from "@vercel/analytics/react";
import { Home } from "./components/home";
import { getServerSideConfig } from "./config/server";
import zhCN from 'antd/locale/zh_CN';

const serverConfig = getServerSideConfig();

export default async function App() {
  return (
    <ConfigProvider locale={zhCN}>
      <Home />
      {serverConfig?.isVercel && (
        <>
          <Analytics />
        </>
      )}
    </ConfigProvider>
  );
}
