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
0fb2e0acc7
commit
baaa6664ec
@ -37,21 +37,6 @@ const defaultOptions: InstallOptions = {
|
||||
|
||||
const Install: React.FC = () => {
|
||||
const [installOptions, setInstallOptions] = useState<InstallOptions>(defaultOptions);
|
||||
const [latestVersion, setLatestVersion] = useState<string>("");
|
||||
|
||||
useEffect(() => {
|
||||
fetch("https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/version/latest")
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
const version = data.trim();
|
||||
setLatestVersion(version);
|
||||
setInstallOptions(prevState => ({
|
||||
...prevState,
|
||||
version: { ...prevState.version, value: version },
|
||||
}));
|
||||
})
|
||||
.catch(error => console.error("Error fetching latest version:", error));
|
||||
}, []);
|
||||
|
||||
const handleInputChange = (e: ChangeEvent<HTMLInputElement | HTMLSelectElement>) => {
|
||||
const { name, value, type, checked } = e.target;
|
||||
|
Loading…
Reference in New Issue
Block a user