0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed tabs in profiles showing up in the wrong place

ref https://linear.app/tryghost/issue/AP-429/add-ui-for-searching-and-viewing-mastodon-profiles
This commit is contained in:
Djordje Vlaisavljevic 2024-10-03 15:27:15 +01:00
parent 1bb09a9b7e
commit 0729c76b95

View file

@ -168,7 +168,8 @@ const ProfileSearchResultModal: React.FC<ProfileSearchResultModalProps> = ({
title: 'Posts',
contents: (
<div>
{posts.map(post => (
{posts.map((post, index) => (
<div>
<FeedItem
actor={profile.actor}
comments={post.object.replies}
@ -177,6 +178,10 @@ const ProfileSearchResultModal: React.FC<ProfileSearchResultModalProps> = ({
type={post.type}
onCommentClick={() => {}}
/>
{index < posts.length - 1 && (
<div className="h-px w-full bg-grey-200"></div>
)}
</div>
))}
</div>
)
@ -278,24 +283,6 @@ const ProfileSearchResultModal: React.FC<ProfileSearchResultModalProps> = ({
onClick={toggleExpand}
/>}
</div>)}
<Heading className='mt-8' level={5}>Posts</Heading>
{posts.map((post) => {
if (post.type === 'Announce') {
return null;
} else {
return (
<FeedItem
actor={profile.actor}
comments={post.object.replies}
layout='feed'
object={post.object}
type={post.type}
onCommentClick={() => {}}
/>
);
}
})}
<TabView<ProfileTab>
containerClassName='mt-6'
selectedTab={selectedTab}