Make the rebuild for errored src packages use the latest package version by default

This commit is contained in:
ferreo 2024-08-02 20:33:17 +01:00
parent 5f263e7e1e
commit 073f9df8c8

View File

@ -65,15 +65,23 @@ const Errored: React.FC = () => {
}
}, [loadPackages]);
const handleRebuildClick = (pkg: any) => {
const handleRebuildClick = async (pkg: any) => {
setSelectedPackage(pkg);
const packResp = await fetch("/api/package/" + pkg.Name, {
method: "GET",
});
const packData = await packResp.json();
const firstPackage = packData.Packages[Object.keys(packData.Packages)[0]];
if (packResp.ok) {
setRebuildData({
packageName: pkg.Name,
version: pkg.BuildVersion,
version: firstPackage.NewVersion || firstPackage.Version,
buildType: "lto",
rebuild: false,
});
setIsDialogOpen(true);
}
};
const handleDialogSubmit = async () => {