From 1618108f6f3ef6db2d9b1a8a893375bf81ebdf14 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 11 Oct 2023 16:12:46 +0200 Subject: [PATCH] fix(feed post): use Comment type from API in props interface --- src/components/feed-post/feed-post.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/feed-post/feed-post.tsx b/src/components/feed-post/feed-post.tsx index 9179c221..6ca3b6f8 100644 --- a/src/components/feed-post/feed-post.tsx +++ b/src/components/feed-post/feed-post.tsx @@ -2,10 +2,11 @@ import { FC } from 'react'; import styles from './feed-post.module.css'; import { Link } from 'react-router-dom'; import utils from '../../lib/utils'; +import { Comment } from '@plebbit/plebbit-react-hooks'; interface FeedPostProps { index: number; - post: any; + post: Comment; } const FeedPost: FC = ({ post, index }) => { @@ -22,7 +23,7 @@ const FeedPost: FC = ({ post, index }) => {

e.preventDefault()}> - {post?.title || post?.content.slice(0, 80) + '...'} + {post?.title || post?.content?.slice(0, 80) + '...'}   {post?.link && (