diff --git a/frontend/components/software/AboutSection.tsx b/frontend/components/software/AboutSection.tsx index bb6e78743..dec831d9f 100644 --- a/frontend/components/software/AboutSection.tsx +++ b/frontend/components/software/AboutSection.tsx @@ -14,7 +14,7 @@ import AboutLanguages from './AboutLanguages' import AboutLicense from './AboutLicense' import AboutSourceCode from './AboutSourceCode' import SoftwareLogo from './SoftwareLogo' -import { SoftwareCategoriesWithHeadline } from './SoftwareCategories' +import {SoftwareCategoriesWithHeadline} from './SoftwareCategories' type AboutSectionType = { brand_name: string diff --git a/frontend/components/software/SoftwareCategories.tsx b/frontend/components/software/SoftwareCategories.tsx index 96d5008df..781632bf8 100644 --- a/frontend/components/software/SoftwareCategories.tsx +++ b/frontend/components/software/SoftwareCategories.tsx @@ -4,20 +4,18 @@ // SPDX-License-Identifier: EUPL-1.2 import CategoryIcon from '@mui/icons-material/Category' -import { CategoriesForSoftware, CategoryEntry, CategoryID, CategoryPath } from '../../types/SoftwareTypes' +import {CategoriesForSoftware, CategoryEntry, CategoryID, CategoryPath} from '../../types/SoftwareTypes' import TagChipFilter from '../layout/TagChipFilter' -import { ssrSoftwareUrl } from '~/utils/postgrestUrl' -import logger from '../../utils/logger' import React from 'react' -import { Chip } from '@mui/material' +import {Chip} from '@mui/material' const interleave = (arr: T[], createElement: (index: number) => T) => arr.reduce((result, element, index, array) => { - result.push(element); + result.push(element) if (index < array.length - 1) { - result.push(createElement(index)); + result.push(createElement(index)) } - return result; -}, [] as T[]); + return result +}, [] as T[]) type CategoryTreeLevel = { @@ -25,7 +23,7 @@ type CategoryTreeLevel = { children: CategoryTreeLevel[] } -function CategoryTree({ categories }: { categories: CategoryPath[] }) { +function CategoryTree({categories}: { categories: CategoryPath[] }) { const tree: CategoryTreeLevel[] = [] for (const path of categories) { @@ -33,7 +31,7 @@ function CategoryTree({ categories }: { categories: CategoryPath[] }) { for (const item of path) { const found = cursor.find(el => el.cat.id == item.id) if (!found) { - const sub: CategoryTreeLevel = { cat: item, children: [] } + const sub: CategoryTreeLevel = {cat: item, children: []} cursor.push(sub) cursor = sub.children } else { @@ -42,8 +40,8 @@ function CategoryTree({ categories }: { categories: CategoryPath[] }) { } } - const TreeLevel = ({ items, indent = false }: { items: CategoryTreeLevel[], indent?: boolean }) => { - return