revert to original useSWR

This commit is contained in:
spencerwooo
2021-08-23 16:26:04 +01:00
parent ae8ada58ca
commit 4c7b27a886
2 changed files with 2 additions and 11 deletions
+1 -8
View File
@@ -17,14 +17,7 @@ import DownloadBtn from '../DownloadBtn'
const fetcher = (url: string) => axios.get(url).then(res => res.data)
const MarkdownPreview: FunctionComponent<{ file: any; standalone?: boolean }> = ({ file, standalone = true }) => {
const { data, error } = useSWR(file['@microsoft.graph.downloadUrl'], fetcher, {
revalidateOnFocus: false,
revalidateOnMount: false,
revalidateOnReconnect: false,
refreshWhenOffline: false,
refreshWhenHidden: false,
refreshInterval: 0,
})
const { data, error } = useSWR(file['@microsoft.graph.downloadUrl'], fetcher)
useEffect(() => {
if (typeof window !== 'undefined') {