Hide versions not supported by the OS

This commit is contained in:
2025-07-19 20:14:52 -07:00
parent f5d6712126
commit 17297e279f

View File

@@ -2,6 +2,7 @@ import './Installs.css'
import { useEffect } from 'react'
import axios from 'axios'
import { InstallsProps } from '../types/InstallsProps'
import { platform } from '@tauri-apps/plugin-os'
export default function Installs({ downloadProgress, showPopup, setShowPopup, setPopupMode, setFadeOut, setSelectedVersionList, setVersionList }: InstallsProps) {
useEffect(() => {
@@ -9,7 +10,7 @@ export default function Installs({ downloadProgress, showPopup, setShowPopup, se
setSelectedVersionList([]);
setVersionList(null)
axios.get('https://berrydash.lncvrt.xyz/database/launcher/versions.php')
.then(res => setVersionList(res.data.reverse()))
.then(res => setVersionList(res.data.reverse().filter((d: { platforms: string[] }) => d.platforms.includes(platform()))))
.catch(() => setVersionList([]))
}, [showPopup])