zammad/zammad

View on GitHub
app/frontend/shared/utils/icons.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function getIconByContentType has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getIconByContentType = (type?: Maybe<string>) => {
  if (!type) return 'file'
  const contentType = type.replace(/^(.+?\/.+?)(\b|\s).+?$/, '$1')

  const icons: Record<string, string> = {
Severity: Minor
Found in app/frontend/shared/utils/icons.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status