Renaming iframely-card to metadata-card

This commit is contained in:
Dessalines 2021-08-17 20:45:08 -04:00
parent 2943e6e1a5
commit dc973d60aa
2 changed files with 9 additions and 9 deletions

View file

@ -3,19 +3,19 @@ import { Post } from "lemmy-js-client";
import { i18n } from "../../i18next"; import { i18n } from "../../i18next";
import { Icon } from "../common/icon"; import { Icon } from "../common/icon";
interface FramelyCardProps { interface MetadataCardProps {
post: Post; post: Post;
} }
interface FramelyCardState { interface MetadataCardState {
expanded: boolean; expanded: boolean;
} }
export class IFramelyCard extends Component< export class MetadataCard extends Component<
FramelyCardProps, MetadataCardProps,
FramelyCardState MetadataCardState
> { > {
private emptyState: FramelyCardState = { private emptyState: MetadataCardState = {
expanded: false, expanded: false,
}; };
@ -82,7 +82,7 @@ export class IFramelyCard extends Component<
); );
} }
handleIframeExpand(i: IFramelyCard) { handleIframeExpand(i: MetadataCard) {
i.state.expanded = !i.state.expanded; i.state.expanded = !i.state.expanded;
i.setState(i.state); i.setState(i.state);
} }

View file

@ -41,7 +41,7 @@ import { MomentTime } from "../common/moment-time";
import { PictrsImage } from "../common/pictrs-image"; import { PictrsImage } from "../common/pictrs-image";
import { CommunityLink } from "../community/community-link"; import { CommunityLink } from "../community/community-link";
import { PersonListing } from "../person/person-listing"; import { PersonListing } from "../person/person-listing";
import { IFramelyCard } from "./iframely-card"; import { MetadataCard } from "./metadata-card";
import { PostForm } from "./post-form"; import { PostForm } from "./post-form";
interface PostListingState { interface PostListingState {
@ -150,7 +150,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
{post.url && this.showBody && post.embed_title && ( {post.url && this.showBody && post.embed_title && (
<IFramelyCard post={post} /> <MetadataCard post={post} />
)} )}
{this.showBody && {this.showBody &&
post.body && post.body &&