add useffect to load pagespeed key in the form

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-05-06 16:47:53 -04:00
1 parent 85c3a16f41
commit 91d3732645
1 file changed
+9
+9
View File
@@ -83,6 +83,15 @@ const Settings = () => {
fetchLatestVersion();
}, []);
const { pagespeedApiKey } = useSelector((state) => state.settings);
useEffect(() => {
setForm((prev) => ({
...prev,
pagespeedApiKey: pagespeedApiKey || "",
}));
}, [pagespeedApiKey]);
const handleChange = (event) => {
const { type, checked, value, id } = event.target;