Refactor: Update and remove comments

This commit is contained in:
XlebyllleK
2025-01-11 19:29:28 +02:00
committed by GitHub
parent 1f652f2bb9
commit b79bb58829
2 changed files with 2 additions and 5 deletions

View File

@@ -23,7 +23,8 @@ export function Header({
const usedRepositories = new Set(Object.values(MIRRORS).map(mirror => mirror.repository));
const filteredRepository = Object.keys(Repository).reduce((acc, key) => {
// Говно-код :D
// This code is flawed because it explicitly checks for 'ALL', reducing flexibility.
// A more generic approach should be used to filter unused repositories while preserving 'ALL'.
if ((key === 'ALL') || usedRepositories.has(Repository[key as keyof typeof Repository])) acc[key] = Repository[key as keyof typeof Repository];
return acc;
}, {} as Record<string, string>);