Download client/src/hooks/Files/useFileMap.ts from Zhitomir/chat: direct link, hf CLI and curl.
- Browser
- Download file 293 Bytes
-
https://huggingface.co/spaces/Zhitomir/chat/resolve/main/client/src/hooks/Files/useFileMap.ts
- Command line
-
hf download hf://spaces/Zhitomir/chat/client/src/hooks/Files/useFileMap.ts
-
curl -L -o useFileMap.ts https://huggingface.co/spaces/Zhitomir/chat/resolve/main/client/src/hooks/Files/useFileMap.ts
293 Bytes
| import { useGetFiles } from '~/data-provider'; | |
| import { mapFiles } from '~/utils'; | |
| export default function useFileMap({ isAuthenticated }: { isAuthenticated: boolean }) { | |
| const { data: fileMap } = useGetFiles({ | |
| select: mapFiles, | |
| enabled: isAuthenticated, | |
| }); | |
| return fileMap; | |
| } | |