Skip to content

Commit 018ef89

Browse files
committed
add very temporary link to point to that html
1 parent a54d216 commit 018ef89

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/components/File.jsx

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Audio from "./previewers/Audio";
88
import Video from "./previewers/Video";
99
import {downloadResource} from "../utils/common";
1010
import Thumbnail from "./previewers/Thumbnail";
11+
import Html from "./previewers/Html";
1112

1213
const useStyles = makeStyles((theme) => ({
1314
appBar: {
@@ -85,6 +86,9 @@ export default function File(props) {
8586
return <Thumbnail fileId={preview["fileid"]} fileType={preview["fileType"]}
8687
imgSrc={preview["resource"]} />;
8788
}
89+
else if (preview["previewType"] === "html"){
90+
return <Html fileId={preview["fileid"]} htmlSrc={preview["url"]} />;
91+
}
8892
})
8993
}
9094
</TabPanel>

src/components/previewers/Html.jsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from "react";
2+
import Link from "@material-ui/core/Link";
3+
4+
export default function Html(props) {
5+
const {fileId, htmlSrc, ...other} = props;
6+
return <Link id={fileId} href={htmlSrc} target="_blank">Click here to preview</Link>
7+
}

0 commit comments

Comments
 (0)