Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript
708 B
Raw Blame
import {
  IconAttachFile,
  IconDocumentText,
  IconImage,
  IconVideo,
} from '@components/SidebarNav/icons'
import { isGfsDocumentFile } from '@lib/gfsDocumentFile'
import { gfsImagePreviewMimeType } from '@lib/gfsImagePreview'
import { isGfsVideoFile } from '@lib/gfsVideoFile'
import type { GfsFileIconProps } from './types'

export type { GfsFileIconProps } from './types'

export function GfsFileIcon({ name, ...iconProps }: GfsFileIconProps) {
  if (gfsImagePreviewMimeType(name)) return <IconImage {...iconProps} />
  if (isGfsVideoFile(name)) return <IconVideo {...iconProps} />
  if (isGfsDocumentFile(name)) return <IconDocumentText {...iconProps} />
  return <IconAttachFile {...iconProps} />
}