@@ -13,6 +13,7 @@ import Header from './Header';
1313import Footer from './Footer' ;
1414
1515import CustomScrollbar from './CustomScrollbar' ;
16+ import ImageModal from './ImagePreviewModal' ;
1617
1718import '../css/Stream' ;
1819
@@ -22,7 +23,7 @@ import {
2223 showHeader as headerFunc
2324} from '../actions' ;
2425
25- export const RoutesWithChat = ( { showHeader, showFooter, setChatSize, showChat, showLeftChat= false , chatClosed, chatSize, headerFunc} ) =>
26+ export const RoutesWithChat = ( { showHeader, showFooter, setChatSize, showChat, showLeftChat= false , chatClosed, chatSize, headerFunc, imageModalSrc } ) =>
2627{
2728 let left = (
2829 < div className = 'flex-shrink-0 stream-embed' style = { { width : chatClosed ? '100%' : `calc(100% - ${ chatSize } px)` , height : chatClosed ? '100%' : '' , display : 'flex' , flexDirection : 'column' } } >
@@ -53,6 +54,11 @@ export const RoutesWithChat = ({showHeader, showFooter, setChatSize, showChat, s
5354 < div title = { showHeader ? "Close Header" : "Open Header" } className = { showHeader ?"close-header-btn" : 'open-header-btn' } >
5455 < span className = { showHeader ? 'close-header-caret' : 'open-header-caret' } onClick = { ( ) => showHeader ? headerFunc ( false ) : headerFunc ( true ) } > ›</ span >
5556 </ div >
57+ { imageModalSrc && (
58+ < ImageModal
59+ src = { imageModalSrc }
60+ />
61+ ) }
5662 < Resizeable
5763 className = 'flex-grow-1 flex-column flex-lg-row'
5864 onResize = { e => {
@@ -80,6 +86,8 @@ RoutesWithChat.propTypes = {
8086 showLeftChat : PropTypes . bool ,
8187 chatClosed : PropTypes . bool ,
8288
89+ imageModalSrc : PropTypes . string ,
90+
8391 chatSize : PropTypes . number . isRequired ,
8492
8593 setChatSize : PropTypes . func . isRequired ,
@@ -96,6 +104,7 @@ export default compose(
96104 showLeftChat : idx ( state , _ => _ . self . profile . data . left_chat ) ,
97105 chatClosed : ! state . ui . showChat || ! state . self . isLoggedIn ,
98106 headerClosed : ! state . ui . showHeader ,
107+ imageModalSrc : state . ui . imageModalSrc ,
99108 } ) ,
100109 {
101110 setChatSize,
0 commit comments