add flag to track if api key is set

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-05-07 13:51:34 -04:00
1 parent 91d3732645
commit 26e9ff3568
1 file changed
+6
+6
View File
@@ -7,6 +7,7 @@ import { useIsAdmin } from "../../Hooks/useIsAdmin";
import Dialog from "../../Components/Dialog";
import ConfigBox from "../../Components/ConfigBox";
import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments";
import { getAppSettings } from "../../Features/Settings/settingsSlice";
import {
WalletMultiButton,
WalletDisconnectButton,
@@ -59,6 +60,7 @@ const Settings = () => {
});
const [version, setVersion] = useState("unknown");
const [apiKeyFieldType, setApiKeyFieldType] = useState("password");
const [isApiKeySet, setIsApiKeySet] = useState(false);
const [errors, setErrors] = useState({});
const deleteStatsMonitorsInitState = { deleteMonitors: false, deleteStats: false };
const [isOpen, setIsOpen] = useState(deleteStatsMonitorsInitState);
@@ -83,6 +85,10 @@ const Settings = () => {
fetchLatestVersion();
}, []);
useEffect(() => {
dispatch(getAppSettings());
}, []);
const { pagespeedApiKey } = useSelector((state) => state.settings);
useEffect(() => {