mirror of
https://github.com/Snigdha-OS/package-browser.git
synced 2025-09-18 10:35:02 +02:00
Refactor: Update and remove comments
This commit is contained in:
@@ -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>);
|
||||
|
Reference in New Issue
Block a user