From 00ac83f4d59427559824dcad8a3e9243d5d3eeae Mon Sep 17 00:00:00 2001 From: Foysal Ahamed Date: Fri, 10 Jan 2025 00:21:01 +0000 Subject: [PATCH] :sparkles: Add fallback url in author feed --- components/common/feeds/AuthorFeed.tsx | 6 ++++++ components/common/posts/Posts.tsx | 6 ++++++ components/common/posts/PostsFeed.tsx | 12 +++++++++++- components/repositories/AccountView.tsx | 24 +++++++++++++++++++++--- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/components/common/feeds/AuthorFeed.tsx b/components/common/feeds/AuthorFeed.tsx index 422f64dd..669dfc41 100644 --- a/components/common/feeds/AuthorFeed.tsx +++ b/components/common/feeds/AuthorFeed.tsx @@ -128,8 +128,12 @@ export const useAuthorFeedQuery = ({ export function AuthorFeed({ id, onReport, + isAuthorDeactivated, + isAuthorTakendown, }: { id: string + isAuthorDeactivated: boolean + isAuthorTakendown: boolean onReport: (uri: string) => void }) { const [query, setQuery] = useState('') @@ -154,6 +158,8 @@ export function AuthorFeed({ onLoadMore={hasNextPage ? () => fetchNextPage() : undefined} typeFilter={typeFilter} setTypeFilter={setTypeFilter} + isAuthorDeactivated={isAuthorDeactivated} + isAuthorTakendown={isAuthorTakendown} /> ) } diff --git a/components/common/posts/Posts.tsx b/components/common/posts/Posts.tsx index 0bd563f9..9c7c47aa 100644 --- a/components/common/posts/Posts.tsx +++ b/components/common/posts/Posts.tsx @@ -26,6 +26,8 @@ export function Posts({ setSearchQuery, typeFilter, setTypeFilter, + isAuthorDeactivated, + isAuthorTakendown, }: { isFromAppview?: boolean items: AppBskyFeedDefs.FeedViewPost[] @@ -36,6 +38,8 @@ export function Posts({ setSearchQuery: (query: string) => void typeFilter: TypeFilterKey setTypeFilter: (type: TypeFilterKey) => void + isAuthorDeactivated: boolean + isAuthorTakendown: boolean }) { const [mode, setMode] = useState(Mode.Feed) @@ -103,6 +107,8 @@ export function Posts({ {mode === Mode.Feed ? (
void onLoadMore?: () => void + isAuthorDeactivated?: boolean + isAuthorTakendown?: boolean }) { return (
@@ -64,7 +68,13 @@ export function PostsFeed({ key={`post-${i}`} className="bg-white dark:bg-slate-800 border-b border-gray-200 dark:border-slate-700 pt-6 pb-4 px-4" > - +
))} {onLoadMore && } diff --git a/components/repositories/AccountView.tsx b/components/repositories/AccountView.tsx index eec6c9ba..8befa06e 100644 --- a/components/repositories/AccountView.tsx +++ b/components/repositories/AccountView.tsx @@ -233,7 +233,14 @@ export function AccountView({
)} {currentView === Views.Posts && ( - + )} {currentView === Views.Follows && ( @@ -640,7 +647,7 @@ function Details({ - + {!tags.length && } {tags.map((tag) => ( @@ -692,11 +699,22 @@ function Details({ function Posts({ id, onReport, + isAuthorDeactivated, + isAuthorTakendown, }: { id: string onReport: (uri: string) => void + isAuthorDeactivated: boolean + isAuthorTakendown: boolean }) { - return + return ( + + ) } function Invites({ repo }: { repo: GetRepo.OutputSchema }) {