diff --git a/src/components/ArticleCard/Articles.tsx b/src/components/ArticleCard/Articles.tsx index 2db3070..2250a31 100644 --- a/src/components/ArticleCard/Articles.tsx +++ b/src/components/ArticleCard/Articles.tsx @@ -71,66 +71,71 @@ const ArticlesCard: FunctionComponent = ({ justifyContent={"space-between"} > - - - {truncate(title, 80)} - - - + + + + {truncate(title, 80)} + + - - - {authorUsername && ( - - + {isOwner && ( + + + + - )} + + + + + + + )} + - {authorUsername && ( - + + + + + + {authorUsername && ( - {authorUsername} + - - )} - + )} - - {authorProfileHeadlines && ( - {truncate(authorProfileHeadlines, 60)} - )} + {authorUsername && ( + + + {authorUsername} + + + )} + - {read_time} - - - + + {authorProfileHeadlines && ( + {truncate(authorProfileHeadlines, 60)} + )} - {isOwner && ( - - - - - - - - - - - - )} + {read_time} + + + + diff --git a/src/hooks/article/useCreateArticleDisLike.ts b/src/hooks/article/useCreateArticleDisLike.ts index 1370dcb..002956c 100644 --- a/src/hooks/article/useCreateArticleDisLike.ts +++ b/src/hooks/article/useCreateArticleDisLike.ts @@ -16,6 +16,10 @@ export const useCreateArticleDisLike = () => { queryClient.invalidateQueries({ queryKey: ['article'] }); + + queryClient.invalidateQueries({ + queryKey: ['public-author-article'] + }); }, onError: (error) => { errorNotification(error?.message) diff --git a/src/hooks/article/useCreateArticleLike.ts b/src/hooks/article/useCreateArticleLike.ts index 7e1dee1..54797b1 100644 --- a/src/hooks/article/useCreateArticleLike.ts +++ b/src/hooks/article/useCreateArticleLike.ts @@ -16,6 +16,10 @@ export const useCreateArticleLike = () => { queryClient.invalidateQueries({ queryKey: ['article'] }); + + queryClient.invalidateQueries({ + queryKey: ['public-author-article'] + }); }, onError: (error) => { errorNotification(error?.message) diff --git a/src/hooks/thread/useCreateThreadDisLike.ts b/src/hooks/thread/useCreateThreadDisLike.ts index 2b695ad..b0419d2 100644 --- a/src/hooks/thread/useCreateThreadDisLike.ts +++ b/src/hooks/thread/useCreateThreadDisLike.ts @@ -16,6 +16,10 @@ export const useCreateThreadDisLike = () => { queryClient.invalidateQueries({ queryKey: ['thread'] }); + + queryClient.invalidateQueries({ + queryKey: ['public-author-threads'] + }); }, onError: (error) => { errorNotification(error?.message) diff --git a/src/hooks/thread/useCreateThreadLike.ts b/src/hooks/thread/useCreateThreadLike.ts index e3b1127..f50b239 100644 --- a/src/hooks/thread/useCreateThreadLike.ts +++ b/src/hooks/thread/useCreateThreadLike.ts @@ -16,6 +16,10 @@ export const useCreateThreadLike = () => { queryClient.invalidateQueries({ queryKey: ['thread'] }); + + queryClient.invalidateQueries({ + queryKey: ['public-author-threads'] + }); }, onError: (error) => { errorNotification(error?.message) diff --git a/src/hooks/thread/useDeleteThread.ts b/src/hooks/thread/useDeleteThread.ts index a78cc8c..88ecdfb 100644 --- a/src/hooks/thread/useDeleteThread.ts +++ b/src/hooks/thread/useDeleteThread.ts @@ -18,6 +18,10 @@ export const useDeleteThread = () => { queryClient.invalidateQueries({ queryKey: ['thread'] }) + + queryClient.invalidateQueries({ + queryKey: ['public-author-threads'] + }); }, onError: (error) => { errorNotification(error?.message) diff --git a/src/pages/Users/show/about.tsx b/src/pages/Users/show/about.tsx index d108f4d..0ddb889 100644 --- a/src/pages/Users/show/about.tsx +++ b/src/pages/Users/show/about.tsx @@ -22,7 +22,9 @@ const PublicUserAboutDetails: FunctionComponent = ( - Connect with {data?.fullname} + {data?.twitter && ( + Connect with {data?.fullname} + )} { const { data, isLoading } = useGetPublicUser(username!) - if (!data) return ; - + if (isLoading) return + if (!data) return ; + const userData = data?.data; return (