diff --git a/client/src/app/App.tsx b/client/src/app/App.tsx index 6b7409777d..3414477eda 100644 --- a/client/src/app/App.tsx +++ b/client/src/app/App.tsx @@ -5,9 +5,6 @@ import { AppRoutes } from "./Routes"; import { DefaultLayout } from "./layout"; import { NotificationsProvider } from "./components/NotificationsContext"; -import "@patternfly/patternfly/patternfly.css"; -import "@patternfly/patternfly/patternfly-addons.css"; - import "./app.css"; const App: React.FC = () => { diff --git a/client/src/app/dayjs.ts b/client/src/app/dayjs.ts new file mode 100644 index 0000000000..a86cf31f90 --- /dev/null +++ b/client/src/app/dayjs.ts @@ -0,0 +1,10 @@ +import dayjs from "dayjs"; +import isSameOrBefore from "dayjs/plugin/isSameOrBefore"; +import utc from "dayjs/plugin/utc"; +import timezone from "dayjs/plugin/timezone"; +import customParseFormat from "dayjs/plugin/customParseFormat"; + +dayjs.extend(utc); +dayjs.extend(timezone); +dayjs.extend(customParseFormat); +dayjs.extend(isSameOrBefore); diff --git a/client/src/index.tsx b/client/src/index.tsx index 29774a8cb8..ce826f80d9 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -1,3 +1,6 @@ +import "@patternfly/patternfly/patternfly.css"; +import "@patternfly/patternfly/patternfly-addons.css"; + import React from "react"; import ReactDOM from "react-dom"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; @@ -7,16 +10,9 @@ import ENV from "@app/env"; import App from "@app/App"; import reportWebVitals from "@app/reportWebVitals"; import { KeycloakProvider } from "@app/components/KeycloakProvider"; -import dayjs from "dayjs"; -import isSameOrBefore from "dayjs/plugin/isSameOrBefore"; -import utc from "dayjs/plugin/utc"; -import timezone from "dayjs/plugin/timezone"; -import customParseFormat from "dayjs/plugin/customParseFormat"; -dayjs.extend(utc); -dayjs.extend(timezone); -dayjs.extend(customParseFormat); -dayjs.extend(isSameOrBefore); +import "@app/dayjs"; +import "@app/i18n"; const queryClient = new QueryClient();