Refactor architecture selection logic in download.tsx

This commit is contained in:
mauro-balades
2024-09-29 19:24:37 +02:00
parent 0f11b85d91
commit dc9ad12b66

View File

@@ -186,9 +186,7 @@ export default function DownloadPage() {
}; };
const changeToFlatpak = () => { const changeToFlatpak = () => {
if (selectedArchitecture === "specific") { setSelectedLinuxDownloadType("flatpak");
setSelectedLinuxDownloadType("flatpak");
}
}; };
return ( return (
@@ -528,10 +526,7 @@ export default function DownloadPage() {
"mb-2 ml-5 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5", "mb-2 ml-5 flex h-full w-full cursor-pointer select-none flex-col items-center rounded-lg border bg-background p-5",
selectedLinuxDownloadType === "flatpak" selectedLinuxDownloadType === "flatpak"
? "border-blue-400" ? "border-blue-400"
: "", : ""
selectedArchitecture === "specific"
? "cursor-not-allowed opacity-50"
: "",
)} )}
> >
<h1 className="my-2 text-5xl opacity-40 dark:opacity-20"> <h1 className="my-2 text-5xl opacity-40 dark:opacity-20">