Disable download button when downloading

This commit is contained in:
2025-07-19 16:15:35 -07:00
parent 1349f779a0
commit 2604dec0f4
7 changed files with 20 additions and 19 deletions

View File

@@ -6,7 +6,7 @@ import { LauncherVersion } from '../types/LauncherVersion'
import axios from 'axios'
import { InstallsProps } from '../types/InstallsProps'
export default function Installs({ downloadVersions }: InstallsProps) {
export default function Installs({ downloadVersions, downloadProgress }: InstallsProps) {
const [showPopup, setShowPopup] = useState(false)
const [fadeOut, setFadeOut] = useState(false)
const [versionList, setVersionList] = useState<null | LauncherVersion[]>(null);
@@ -39,6 +39,7 @@ export default function Installs({ downloadVersions }: InstallsProps) {
<button
className='button text-3xl mt-4 absolute right-4 top-4'
onClick={downloadVersion}
disabled={downloadProgress.length != 0}
>
Download new version
</button>