add flag to track if api key is set
This commit is contained in:
1 parent
91d3732645
commit
26e9ff3568
1 file changed
+6
@@ -7,6 +7,7 @@ import { useIsAdmin } from "../../Hooks/useIsAdmin";
|
|||||||
import Dialog from "../../Components/Dialog";
|
import Dialog from "../../Components/Dialog";
|
||||||
import ConfigBox from "../../Components/ConfigBox";
|
import ConfigBox from "../../Components/ConfigBox";
|
||||||
import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments";
|
import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments";
|
||||||
|
import { getAppSettings } from "../../Features/Settings/settingsSlice";
|
||||||
import {
|
import {
|
||||||
WalletMultiButton,
|
WalletMultiButton,
|
||||||
WalletDisconnectButton,
|
WalletDisconnectButton,
|
||||||
@@ -59,6 +60,7 @@ const Settings = () => {
|
|||||||
});
|
});
|
||||||
const [version, setVersion] = useState("unknown");
|
const [version, setVersion] = useState("unknown");
|
||||||
const [apiKeyFieldType, setApiKeyFieldType] = useState("password");
|
const [apiKeyFieldType, setApiKeyFieldType] = useState("password");
|
||||||
|
const [isApiKeySet, setIsApiKeySet] = useState(false);
|
||||||
const [errors, setErrors] = useState({});
|
const [errors, setErrors] = useState({});
|
||||||
const deleteStatsMonitorsInitState = { deleteMonitors: false, deleteStats: false };
|
const deleteStatsMonitorsInitState = { deleteMonitors: false, deleteStats: false };
|
||||||
const [isOpen, setIsOpen] = useState(deleteStatsMonitorsInitState);
|
const [isOpen, setIsOpen] = useState(deleteStatsMonitorsInitState);
|
||||||
@@ -83,6 +85,10 @@ const Settings = () => {
|
|||||||
fetchLatestVersion();
|
fetchLatestVersion();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
dispatch(getAppSettings());
|
||||||
|
}, []);
|
||||||
|
|
||||||
const { pagespeedApiKey } = useSelector((state) => state.settings);
|
const { pagespeedApiKey } = useSelector((state) => state.settings);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in new issue
Block a user