mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update index.tsx
This commit is contained in:
parent
784e33c3f6
commit
a5ec7ab826
@ -47,11 +47,11 @@ const Install: React.FC = () => {
|
|||||||
.catch(error => console.error("Error fetching latest version:", error));
|
.catch(error => console.error("Error fetching latest version:", error));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>) => { // Modified
|
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>) => {
|
||||||
const { name, value, type, checked } = e.target;
|
const { name, value, type, checked } = e.target;
|
||||||
setInstallOptions(prevState => ({
|
setInstallOptions(prevState => ({
|
||||||
...prevState,
|
...prevState,
|
||||||
[name]: { ...prevState[name], value: type === "checkbox" ? checked : value }, // Modified
|
[name]: { ...prevState[name], value: type === "checkbox" ? checked : value },
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -101,7 +101,8 @@ const Install: React.FC = () => {
|
|||||||
type="text"
|
type="text"
|
||||||
id={key}
|
id={key}
|
||||||
name={key}
|
name={key}
|
||||||
value={latestVersion}
|
value={value.value}
|
||||||
|
onChange={handleInputChange}
|
||||||
/>
|
/>
|
||||||
) : key === "screenshots" ? ( // Modified
|
) : key === "screenshots" ? ( // Modified
|
||||||
<select // Modified
|
<select // Modified
|
||||||
|
Loading…
Reference in New Issue
Block a user