54 lines
1.7 KiB
JavaScript
54 lines
1.7 KiB
JavaScript
import { ApolloProvider } from "@apollo/client";
|
|
import { ConfigProvider } from "antd";
|
|
import enLocale from "antd/es/locale/en_US";
|
|
import LogRocket from "logrocket";
|
|
import moment from "moment";
|
|
import React from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import GlobalLoadingBar from "../components/global-loading-bar/global-loading-bar.component";
|
|
import JiraSupportComponent from "../components/jira-support-widget/jira-support-widget.component";
|
|
import client from "../utils/GraphQLClient";
|
|
import App from "./App";
|
|
moment.locale("en-US");
|
|
|
|
if (process.env.NODE_ENV === "production") LogRocket.init("gvfvfw/bodyshopapp");
|
|
|
|
export default function AppContainer() {
|
|
const { t } = useTranslation();
|
|
|
|
// useEffect(() => {
|
|
// // Include the Crisp code here, without the <script></script> tags
|
|
// window.$crisp = [];
|
|
// window.CRISP_WEBSITE_ID = "36724f62-2eb0-4b29-9cdd-9905fb99913e";
|
|
// var d = document;
|
|
// var s = d.createElement("script");
|
|
// s.src = "https://client.crisp.chat/l.js";
|
|
// s.async = 1;
|
|
// d.getElementsByTagName("head")[0].appendChild(s);
|
|
|
|
// return () => {
|
|
// d.getElementsByTagName("head")[0].removeChild(s);
|
|
// };
|
|
// }, []);
|
|
|
|
return (
|
|
<ApolloProvider client={client}>
|
|
<ConfigProvider
|
|
//componentSize="small"
|
|
input={{ autoComplete: "new-password" }}
|
|
locale={enLocale}
|
|
form={{
|
|
validateMessages: {
|
|
// eslint-disable-next-line no-template-curly-in-string
|
|
required: t("general.validation.required", { label: "${label}" }),
|
|
},
|
|
}}
|
|
>
|
|
<GlobalLoadingBar />
|
|
<App />
|
|
<JiraSupportComponent />
|
|
</ConfigProvider>
|
|
</ApolloProvider>
|
|
);
|
|
}
|