File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import Audio from "./previewers/Audio";
8
8
import Video from "./previewers/Video" ;
9
9
import { downloadResource } from "../utils/common" ;
10
10
import Thumbnail from "./previewers/Thumbnail" ;
11
+ import Html from "./previewers/Html" ;
11
12
12
13
const useStyles = makeStyles ( ( theme ) => ( {
13
14
appBar : {
@@ -85,6 +86,9 @@ export default function File(props) {
85
86
return < Thumbnail fileId = { preview [ "fileid" ] } fileType = { preview [ "fileType" ] }
86
87
imgSrc = { preview [ "resource" ] } /> ;
87
88
}
89
+ else if ( preview [ "previewType" ] === "html" ) {
90
+ return < Html fileId = { preview [ "fileid" ] } htmlSrc = { preview [ "url" ] } /> ;
91
+ }
88
92
} )
89
93
}
90
94
</ TabPanel >
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments