summaryrefslogtreecommitdiffstats
path: root/ui/src/components/iframely-card.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-03-07 18:31:13 -0500
committerDessalines <tyhou13@gmx.com>2020-03-07 18:31:13 -0500
commitac280782b27b07e5282af03e329253503100ef99 (patch)
tree85cb2195686814650986d6d9c96eb6bf9d121c1b /ui/src/components/iframely-card.tsx
parent496c4e523c95ffad4b2749896f6c22409a2b3c3f (diff)
Iframely and pictshare backend mostly done.
Diffstat (limited to 'ui/src/components/iframely-card.tsx')
-rw-r--r--ui/src/components/iframely-card.tsx24
1 files changed, 12 insertions, 12 deletions
diff --git a/ui/src/components/iframely-card.tsx b/ui/src/components/iframely-card.tsx
index 31929eaf..0d56a0b6 100644
--- a/ui/src/components/iframely-card.tsx
+++ b/ui/src/components/iframely-card.tsx
@@ -1,10 +1,10 @@
import { Component, linkEvent } from 'inferno';
-import { FramelyData } from '../interfaces';
+import { Post } from '../interfaces';
import { mdToHtml } from '../utils';
import { i18n } from '../i18next';
interface FramelyCardProps {
- iframely: FramelyData;
+ post: Post;
}
interface FramelyCardState {
@@ -25,18 +25,18 @@ export class IFramelyCard extends Component<
}
render() {
- let iframely = this.props.iframely;
+ let post = this.props.post;
return (
<>
- {iframely.title && !this.state.expanded && (
+ {post.embed_title && !this.state.expanded && (
<div class="card mt-3 mb-2">
<div class="row">
<div class="col-12">
<div class="card-body">
<h5 class="card-title d-inline">
<span>
- <a class="text-body" target="_blank" href={iframely.url}>
- {iframely.title}
+ <a class="text-body" target="_blank" href={post.url}>
+ {post.embed_title}
</a>
</span>
</h5>
@@ -44,14 +44,14 @@ export class IFramelyCard extends Component<
<a
class="text-muted font-italic"
target="_blank"
- href={iframely.url}
+ href={post.url}
>
- {new URL(iframely.url).hostname}
+ {new URL(post.url).hostname}
<svg class="ml-1 icon">
<use xlinkHref="#icon-external-link"></use>
</svg>
</a>
- {iframely.html && (
+ {post.embed_html && (
<span
class="ml-2 pointer text-monospace"
onClick={linkEvent(this, this.handleIframeExpand)}
@@ -61,10 +61,10 @@ export class IFramelyCard extends Component<
</span>
)}
</span>
- {iframely.description && (
+ {post.embed_description && (
<div
className="card-text small text-muted md-div"
- dangerouslySetInnerHTML={mdToHtml(iframely.description)}
+ dangerouslySetInnerHTML={mdToHtml(post.embed_description)}
/>
)}
</div>
@@ -75,7 +75,7 @@ export class IFramelyCard extends Component<
{this.state.expanded && (
<div
class="mt-3 mb-2"
- dangerouslySetInnerHTML={{ __html: iframely.html }}
+ dangerouslySetInnerHTML={{ __html: post.embed_html }}
/>
)}
</>