Fix helper text to correctly use translation to display message not key

This commit is contained in:
llpingll committed 2026-01-25 15:45:34 +00:00
1 parent 4645bde025
commit 14a08a303b
1 file changed
+7 -4
@@ -85,7 +85,10 @@ const PasswordPanel = () => {
// Check for expired/invalid token before submitting // Check for expired/invalid token before submitting
if (!authToken) { if (!authToken) {
createToast({ createToast({
body: t("passwordPanel.sessionExpired", "Your session has expired. Please log in again."), body: t(
"passwordPanel.sessionExpired",
"Your session has expired. Please log in again."
),
}); });
dispatch(clearAuthState()); dispatch(clearAuthState());
navigate("/login"); navigate("/login");
@@ -179,7 +182,7 @@ const PasswordPanel = () => {
value={localData.password} value={localData.password}
onChange={handleChange} onChange={handleChange}
error={errors[idToName["edit-current-password"]] ? true : false} error={errors[idToName["edit-current-password"]] ? true : false}
helperText={errors[idToName["edit-current-password"]]} helperText={t(errors[idToName["edit-current-password"]])}
endAdornment={<PasswordEndAdornment />} endAdornment={<PasswordEndAdornment />}
flex={1} flex={1}
/> />
@@ -205,7 +208,7 @@ const PasswordPanel = () => {
value={localData.newPassword} value={localData.newPassword}
onChange={handleChange} onChange={handleChange}
error={errors[idToName["edit-new-password"]] ? true : false} error={errors[idToName["edit-new-password"]] ? true : false}
helperText={errors[idToName["edit-new-password"]]} helperText={t(errors[idToName["edit-new-password"]])}
endAdornment={<PasswordEndAdornment />} endAdornment={<PasswordEndAdornment />}
flex={1} flex={1}
/> />
@@ -231,7 +234,7 @@ const PasswordPanel = () => {
value={localData.confirm} value={localData.confirm}
onChange={handleChange} onChange={handleChange}
error={errors[idToName["edit-confirm-password"]] ? true : false} error={errors[idToName["edit-confirm-password"]] ? true : false}
helperText={errors[idToName["edit-confirm-password"]]} helperText={t(errors[idToName["edit-confirm-password"]])}
endAdornment={<PasswordEndAdornment />} endAdornment={<PasswordEndAdornment />}
flex={1} flex={1}
/> />