app/frontend/shared/utils/icons.ts
Function getIconByContentType
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getIconByContentType = (type?: Maybe<string>) => {
if (!type) return 'file'
const contentType = type.replace(/^(.+?\/.+?)(\b|\s).+?$/, '$1')
const icons: Record<string, string> = {