a better abstraction of download buttons

This commit is contained in:
spencerwooo
2021-12-29 15:23:47 +08:00
parent 0613e035b2
commit 5bc8fc4a67
14 changed files with 161 additions and 121 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ import 'katex/dist/katex.min.css'
import FourOhFour from '../FourOhFour'
import Loading from '../Loading'
import DownloadBtn from '../DownloadBtn'
import DownloadButtonGroup from '../DownloadBtnGtoup'
import { useStaleSWR } from '../../utils/fetchWithSWR'
const MarkdownPreview: FunctionComponent<{ file: any; path: string; standalone?: boolean }> = ({
@@ -100,7 +100,7 @@ const MarkdownPreview: FunctionComponent<{ file: any; path: string; standalone?:
</div>
{standalone && (
<div className="mt-4">
<DownloadBtn downloadUrl={file['@microsoft.graph.downloadUrl']} />
<DownloadButtonGroup downloadUrl={file['@microsoft.graph.downloadUrl']} />
</div>
)}
</>