import App from "./App";
import AppM from "./AppM";
import store from "./store/index";
import zhCN from "antd/es/locale/zh_CN";
import { ConfigProvider } from "antd";
import { Provider } from "react-redux";

import { createRoot } from "react-dom/client";
import { isMobiileFu } from "./utils/storage";

const container = document.getElementById("root") as HTMLElement;
const root = createRoot(container);

if (isMobiileFu()) {
  root.render(
    <ConfigProvider locale={zhCN}>
      <Provider store={store}>
        <AppM />
      </Provider>
    </ConfigProvider>
  );
} else {
  root.render(
    <ConfigProvider locale={zhCN}>
    <Provider store={store}>
      <App />
    </Provider>
    </ConfigProvider>
  );
}
