From 2e3452bc61aa99447ebfbf0fc2258524bc7bb1f9 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 23 Jan 2026 21:43:33 -0500 Subject: [PATCH] feature/IO-3499-React-19 - The great button refactor of 2026 --- client/src/App/App.container.jsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/client/src/App/App.container.jsx b/client/src/App/App.container.jsx index 4655c701d..8abf59242 100644 --- a/client/src/App/App.container.jsx +++ b/client/src/App/App.container.jsx @@ -3,7 +3,7 @@ import * as Sentry from "@sentry/react"; import { SplitFactoryProvider, useSplitClient } from "@splitsoftware/splitio-react"; import { ConfigProvider } from "antd"; import enLocale from "antd/es/locale/en_US"; -import { useEffect } from "react"; +import { useEffect, useMemo } from "react"; import { CookiesProvider } from "react-cookie"; import { useTranslation } from "react-i18next"; import { useDispatch, useSelector } from "react-redux"; @@ -44,15 +44,18 @@ function AppContainer() { const currentUser = useSelector(selectCurrentUser); 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 = () => ({ - validateMessages: { - required: t("general.validation.required", { label: "${label}" }) - } - }); + const antdForm = useMemo( + () => ({ + validateMessages: { + required: t("general.validation.required", { label: "${label}" }) + } + }), + [t] + ); // Global seamless logout listener with redirect to /signin useEffect(() => {