mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
useSWR instead of custom useAxiosGet hook for cache reuse
This commit is contained in:
@@ -5,7 +5,7 @@ import useAxiosGet from '../../utils/fetchOnMount'
|
||||
import { DownloadBtnContainer, PreviewContainer } from './Containers'
|
||||
|
||||
const TextPreview = ({ file }) => {
|
||||
const { content, error, validating } = useAxiosGet(file['@microsoft.graph.downloadUrl'])
|
||||
const { response: content, error, validating } = useAxiosGet(file['@microsoft.graph.downloadUrl'])
|
||||
if (error) {
|
||||
return (
|
||||
<PreviewContainer>
|
||||
|
||||
Reference in New Issue
Block a user