From 872b84aa95fba35102b13191bb3817c9219f688b Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Wed, 30 Oct 2024 17:09:38 -0700 Subject: [PATCH] Move reason inside post, fix incorrect header post and topic borders --- src/app/dashboard/topics/[topic]/layout.tsx | 2 +- .../user/[handle]/(post)/post/[id]/layout.tsx | 2 +- .../contentDisplay/feedPost/FeedPost.tsx | 15 ++++----------- .../contentDisplay/topicHeader/TopicHeader.tsx | 12 +++++++----- src/components/dataDisplay/reason/Reason.tsx | 1 + src/containers/thread/ParentContainer.tsx | 2 +- 6 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/app/dashboard/topics/[topic]/layout.tsx b/src/app/dashboard/topics/[topic]/layout.tsx index 0e81d3ce..6e4705ce 100644 --- a/src/app/dashboard/topics/[topic]/layout.tsx +++ b/src/app/dashboard/topics/[topic]/layout.tsx @@ -13,7 +13,7 @@ export default async function TopicsLayout({ }) { return ( <> -
+
diff --git a/src/app/dashboard/user/[handle]/(post)/post/[id]/layout.tsx b/src/app/dashboard/user/[handle]/(post)/post/[id]/layout.tsx index 8ef4b6f6..553da699 100644 --- a/src/app/dashboard/user/[handle]/(post)/post/[id]/layout.tsx +++ b/src/app/dashboard/user/[handle]/(post)/post/[id]/layout.tsx @@ -47,7 +47,7 @@ export default function PostThreadLayout({ }) { return ( <> -
+

Post

diff --git a/src/components/contentDisplay/feedPost/FeedPost.tsx b/src/components/contentDisplay/feedPost/FeedPost.tsx index a384dc75..7b372d18 100644 --- a/src/components/contentDisplay/feedPost/FeedPost.tsx +++ b/src/components/contentDisplay/feedPost/FeedPost.tsx @@ -52,12 +52,8 @@ export default function FeedPost(props: Props) { if (!showPost) { return ( <> - {reason && ( -
- -
- )} -
+
+ {reason && }
@@ -77,11 +73,6 @@ export default function FeedPost(props: Props) { return ( <> - {reason && ( -
- -
- )}
{ e.stopPropagation(); @@ -93,6 +84,8 @@ export default function FeedPost(props: Props) { }} className="cursor-pointer hover:bg-skin-secondary p-3" > + {reason && } +
{ diff --git a/src/components/contentDisplay/topicHeader/TopicHeader.tsx b/src/components/contentDisplay/topicHeader/TopicHeader.tsx index b26c215b..a6bd927c 100644 --- a/src/components/contentDisplay/topicHeader/TopicHeader.tsx +++ b/src/components/contentDisplay/topicHeader/TopicHeader.tsx @@ -24,11 +24,13 @@ export default function TopicHeader(props: Props) { return (
{error && ( - +
+ +
)} {data?.image && !hideImage && ( diff --git a/src/components/dataDisplay/reason/Reason.tsx b/src/components/dataDisplay/reason/Reason.tsx index 5eaf6dd4..f69c35fa 100644 --- a/src/components/dataDisplay/reason/Reason.tsx +++ b/src/components/dataDisplay/reason/Reason.tsx @@ -24,6 +24,7 @@ export default function Reason(props: Props) { {isRepost && ( e.stopPropagation()} className="max-w-fit" >
diff --git a/src/containers/thread/ParentContainer.tsx b/src/containers/thread/ParentContainer.tsx index 32600148..a5ca564b 100644 --- a/src/containers/thread/ParentContainer.tsx +++ b/src/containers/thread/ParentContainer.tsx @@ -17,7 +17,7 @@ export default function ParentContainer(props: Props) { const [showMore, setShowMore] = useState(false); return ( -
+
{parentChain.map((parent, i) => (
{AppBskyFeedDefs.isBlockedPost(parent) && (