diff --git a/src/ui/component/common/form-components/form-field.jsx b/src/ui/component/common/form-components/form-field.jsx index 610e83b57..fde302338 100644 --- a/src/ui/component/common/form-components/form-field.jsx +++ b/src/ui/component/common/form-components/form-field.jsx @@ -6,8 +6,6 @@ import 'easymde/dist/easymde.min.css'; import Toggle from 'react-toggle'; import { openEditorMenu, stopContextMenu } from 'util/context-menu'; import SimpleMDE from 'react-simplemde-editor'; -// It would be nice to use the lazy markdown preview component but react-dom/server -// doesn't support it yet. We use that for renderToString on our markdown text import MarkdownPreview from 'component/common/markdown-preview-internal'; type Props = { diff --git a/src/ui/component/common/paginate.jsx b/src/ui/component/common/paginate.jsx index c775ba821..c30be815f 100644 --- a/src/ui/component/common/paginate.jsx +++ b/src/ui/component/common/paginate.jsx @@ -42,10 +42,7 @@ function Paginate(props: Props) { return ( // Hide the paginate controls if we are loading or there is only one page - // This is a little weird but it makes the component - // really nice to work with. It will always handle fetching your data, - // even if the data returned doesn't have more than one page - // fetchStuff(page)} /> + // It should still be rendered to trigger the onPageChange callback
diff --git a/src/ui/component/fileViewer/internal/player.jsx b/src/ui/component/fileViewer/internal/player.jsx index 9c6575a35..c176aa30b 100644 --- a/src/ui/component/fileViewer/internal/player.jsx +++ b/src/ui/component/fileViewer/internal/player.jsx @@ -34,6 +34,8 @@ type State = { contentType?: string, downloadPath?: string, fileType?: string, + // Just using `any` because flow isn't working with `fs.createReadStream` + stream?: ({}) => any, }, }; @@ -287,6 +289,10 @@ class MediaPlayer extends React.PureComponent { contentType, downloadPath, fileType: path.extname(fileName).substring(1), + // Readable stream from file + // @if TARGET='app' + stream: opts => fs.createReadStream(downloadPath, opts), + // @endif }; // Update state