diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 04c3d0b..58f89bf 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -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); diff --git a/src/services/api.ts b/src/services/api.ts index a620e8f..26dea7a 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -8,10 +8,6 @@ export const MIRRORS: Record = { - /** - * Сейчас данный код будет удобным вариантом, - * чтобы убрать убирать пустые (неиспользуемые) репозитории из главной страницы - */ 'core': { url: 'https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-core/refs/heads/master/packages.txt', repository: ('core' as Repository)