1- import { IPFSContent , IPFSContentDetails } from 'src/services/ipfs/types' ;
21import { CYBER_GATEWAY } from 'src/constants/config' ;
2+ import { CYBER_GATEWAY_URL } from 'src/services/ipfs/config' ;
3+ import { IPFSContent , IPFSContentDetails } from 'src/services/ipfs/types' ;
4+ import { Option } from 'src/types' ;
5+ import EPubView from '../EPubView/EPubView' ;
6+ import Pdf from '../PDF' ;
7+ import TextMarkdown from '../TextMarkdown' ;
38import VideoPlayerGatewayOnly from '../VideoPlayer/VideoPlayerGatewayOnly' ;
9+ import Audio from './component/Audio/Audio' ;
410import GatewayContent from './component/gateway' ;
5- import TextMarkdown from '../TextMarkdown' ;
6- import LinkHttp from './component/link' ;
7- import Pdf from '../PDF' ;
811import Img from './component/img' ;
9- import Audio from './component/Audio/Audio' ;
10- import { Option } from 'src/types' ;
12+ import LinkHttp from './component/link' ;
1113
1214function OtherItem ( {
1315 content,
@@ -83,6 +85,12 @@ function ContentIpfs({ details, content, cid, search }: ContentTabProps) {
8385 < LinkHttp url = { details . content ! } preview = { search } />
8486 ) }
8587 { contentType === 'html' && < HtmlItem cid = { content ?. cid } /> }
88+ { contentType === 'epub' && (
89+ < EPubView
90+ url = { `${ CYBER_GATEWAY_URL } /ipfs/${ cid } ` }
91+ search = { search }
92+ />
93+ ) }
8694 { [ 'other' , 'cid' ] . some ( ( i ) => i === contentType ) && (
8795 < OtherItem search = { search } cid = { cid } content = { details . content } />
8896 ) }
@@ -91,4 +99,5 @@ function ContentIpfs({ details, content, cid, search }: ContentTabProps) {
9199 </ div >
92100 ) ;
93101}
102+
94103export default ContentIpfs ;
0 commit comments