rename useAxiosFetch hook for universal fetch usage

This commit is contained in:
spencerwooo
2022-01-24 19:16:32 +08:00
parent bfbe4eb042
commit 0b55fe5fc7
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import FourOhFour from '../FourOhFour'
import Loading from '../Loading'
import { DownloadButton } from '../DownloadBtnGtoup'
import useFileContent from '../../utils/fetchOnMount'
import useAxiosGet from '../../utils/fetchOnMount'
import { DownloadBtnContainer, PreviewContainer } from './Containers'
const parseDotUrl = (content: string): string | undefined => {
@@ -12,7 +12,7 @@ const parseDotUrl = (content: string): string | undefined => {
}
const TextPreview = ({ file }) => {
const { content, error, validating } = useFileContent(file['@microsoft.graph.downloadUrl'])
const { content, error, validating } = useAxiosGet(file['@microsoft.graph.downloadUrl'])
if (error) {
return (
<PreviewContainer>