Spaces:
Configuration error
Configuration error
Download frontend/src/components/features/file-explorer/file-icon.tsx from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 365 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/file-explorer/file-icon.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/components/features/file-explorer/file-icon.tsx
-
curl -L -o file-icon.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/file-explorer/file-icon.tsx
365 Bytes
| import { FaFile } from "react-icons/fa"; | |
| import { getExtension } from "#/utils/utils"; | |
| import { EXTENSION_ICON_MAP } from "../../extension-icon-map.constant"; | |
| interface FileIconProps { | |
| filename: string; | |
| } | |
| export function FileIcon({ filename }: FileIconProps) { | |
| const extension = getExtension(filename); | |
| return EXTENSION_ICON_MAP[extension] || <FaFile />; | |
| } | |