fix: fallback to first endpoint

This commit is contained in:
2024-08-21 12:12:01 +01:00
parent 86f13c171d
commit 855a87aadc
3 changed files with 8 additions and 6 deletions

View File

@ -12,7 +12,8 @@ export default function DashboardIntroFinal() {
const [info, setInfo] = useState<StreamProviderInfo>();
const defaultEndpoint = useMemo(() => {
return info?.endpoints.find(a => a.name == "Best");
return info?.endpoints.find(a => a.name == "Best")
?? info?.endpoints[0];
}, [info]);
async function loadInfo() {