feature/IO-3499-React-19 - The great button refactor of 2026
This commit is contained in:
@@ -3,7 +3,7 @@ import * as Sentry from "@sentry/react";
|
|||||||
import { SplitFactoryProvider, useSplitClient } from "@splitsoftware/splitio-react";
|
import { SplitFactoryProvider, useSplitClient } from "@splitsoftware/splitio-react";
|
||||||
import { ConfigProvider } from "antd";
|
import { ConfigProvider } from "antd";
|
||||||
import enLocale from "antd/es/locale/en_US";
|
import enLocale from "antd/es/locale/en_US";
|
||||||
import { useEffect } from "react";
|
import { useEffect, useMemo } from "react";
|
||||||
import { CookiesProvider } from "react-cookie";
|
import { CookiesProvider } from "react-cookie";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
@@ -44,15 +44,18 @@ function AppContainer() {
|
|||||||
const currentUser = useSelector(selectCurrentUser);
|
const currentUser = useSelector(selectCurrentUser);
|
||||||
const isDarkMode = useSelector(selectDarkMode);
|
const isDarkMode = useSelector(selectDarkMode);
|
||||||
|
|
||||||
const theme = () => getTheme(isDarkMode);
|
const theme = useMemo(() => getTheme(isDarkMode), [isDarkMode]);
|
||||||
|
|
||||||
const antdInput = () => ({ autoComplete: "new-password" });
|
const antdInput = useMemo(() => ({ autoComplete: "new-password" }), []);
|
||||||
|
|
||||||
const antdForm = () => ({
|
const antdForm = useMemo(
|
||||||
validateMessages: {
|
() => ({
|
||||||
required: t("general.validation.required", { label: "${label}" })
|
validateMessages: {
|
||||||
}
|
required: t("general.validation.required", { label: "${label}" })
|
||||||
});
|
}
|
||||||
|
}),
|
||||||
|
[t]
|
||||||
|
);
|
||||||
|
|
||||||
// Global seamless logout listener with redirect to /signin
|
// Global seamless logout listener with redirect to /signin
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user