diff --git a/components/FileListing.tsx b/components/FileListing.tsx index 7e8604b..1dbca1c 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -109,9 +109,7 @@ const FileListing: FunctionComponent<{ query?: ParsedUrlQuery }> = ({ query }) = const path = queryToPath(query) - const { data, error } = useSWR(`/api?path=${path}`, fetcher, { - revalidateOnFocus: false, - }) + const { data, error } = useSWR(`/api?path=${path}`, fetcher) if (error) { return ( diff --git a/components/previews/MarkdownPreview.tsx b/components/previews/MarkdownPreview.tsx index 3fa4e09..3ef0d0d 100644 --- a/components/previews/MarkdownPreview.tsx +++ b/components/previews/MarkdownPreview.tsx @@ -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') {