summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post-form.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-12-29 16:56:55 -0500
committerDessalines <tyhou13@gmx.com>2019-12-29 16:56:55 -0500
commite5a9ccaff12fbe97065f15a817ea1c6a64395297 (patch)
treed671805cde647c8ede1337b153bc2502b0e381ca /ui/src/components/post-form.tsx
parentdfd27ea85c2e2ced7d44de05eebcb45446e5a5ce (diff)
Preview image type post.
- Fixes #383
Diffstat (limited to 'ui/src/components/post-form.tsx')
-rw-r--r--ui/src/components/post-form.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx
index 7e60b2b0..0b4d0576 100644
--- a/ui/src/components/post-form.tsx
+++ b/ui/src/components/post-form.tsx
@@ -26,6 +26,7 @@ import {
archiveUrl,
mdToHtml,
debounce,
+ isImage,
} from '../utils';
import * as autosize from 'autosize';
import { i18n } from '../i18next';
@@ -193,6 +194,9 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
<use xlinkHref="#icon-spinner"></use>
</svg>
)}
+ {isImage(this.state.postForm.url) && (
+ <img src={this.state.postForm.url} class="img-fluid" />
+ )}
{this.state.crossPosts.length > 0 && (
<>
<div class="my-1 text-muted small font-weight-bold">