mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-02-09 11:05:25 -06:00
add useffect to load pagespeed key in the form
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user