diff --git a/src/components/Topic/TopicBadge/TopicBadge.module.scss b/src/components/Topic/TopicBadge/TopicBadge.module.scss index 17c1088f..15c3f6ce 100644 --- a/src/components/Topic/TopicBadge/TopicBadge.module.scss +++ b/src/components/Topic/TopicBadge/TopicBadge.module.scss @@ -39,18 +39,12 @@ .title { color: var(--blue-500); font-weight: 700; + text-transform: uppercase; } .description { color: var(--black-400); } - - .stat { - display: flex; - gap: 1rem; - flex-direction: row; - color: var(--default-color); - } } .actions { diff --git a/src/components/Topic/TopicBadge/TopicBadge.tsx b/src/components/Topic/TopicBadge/TopicBadge.tsx index 28368b66..ee43e986 100644 --- a/src/components/Topic/TopicBadge/TopicBadge.tsx +++ b/src/components/Topic/TopicBadge/TopicBadge.tsx @@ -51,27 +51,17 @@ export const TopicBadge = (props: Props) => { style={props.topic.pic && { 'background-image': `url('${imageProxy(props.topic.pic)}')` }} /> - {capitalize(props.topic.title)} - + {props.topic.title} + + {props.topic.stat.shouts ?? 0} {t('Publications')} + + } + >
{props.topic.body}
- - -
- {t('Authors')}: {props.topic.stat.authors} -
-
- -
- {t('Followers')}: {props.topic.stat.followers} -
-
- -
- {t('Publications')}: {props.topic.stat.shouts} -
-
-
diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx index 0ea039f3..cd479d8f 100644 --- a/src/components/Views/Author/Author.tsx +++ b/src/components/Views/Author/Author.tsx @@ -36,6 +36,7 @@ export const AuthorView = (props: Props) => { const { page } = useRouter() const author = createMemo(() => authorEntities()[props.authorSlug]) + console.log('!!! author:', author()) const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false) const [isBioExpanded, setIsBioExpanded] = createSignal(false) const [followers, setFollowers] = createSignal([]) @@ -139,11 +140,13 @@ export const AuthorView = (props: Props) => {
  • - {t('Publications')} + + {t('Publications')} ({author().stat.shouts}) +
  • - {t('Comments')} + {t('Comments')} ({author().stat.commented})
  • diff --git a/src/graphql/query/author-by-slug.ts b/src/graphql/query/author-by-slug.ts index b6537e9d..9a673200 100644 --- a/src/graphql/query/author-by-slug.ts +++ b/src/graphql/query/author-by-slug.ts @@ -9,14 +9,17 @@ export default gql` bio about userpic - communities + # communities links createdAt lastSeen - # ratings { - # rater - # value - # } + stat { + shouts + followers + followings + rating + commented + } } } ` diff --git a/src/graphql/types.gen.ts b/src/graphql/types.gen.ts index 86e32fb3..293826d2 100644 --- a/src/graphql/types.gen.ts +++ b/src/graphql/types.gen.ts @@ -318,7 +318,7 @@ export type ProfileInput = { export type Query = { authorsAll: Array> - getAuthor?: Maybe + getAuthor?: Maybe getTopic?: Maybe isEmailUsed: Scalars['Boolean'] loadAuthorsBy: Array>