From ba00fbd672dfda62128194be6a593bc93f85033f Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 7 Apr 2023 03:20:46 +0100 Subject: [PATCH] feat: add title badge --- data/titles.json | 10 +++++ src/components/common/CharacterCard.tsx | 6 ++- src/components/common/CommentItem.tsx | 2 + src/components/common/Titles.tsx | 49 +++++++++++++++++++++++++ src/components/main/MainFeed.tsx | 2 + src/components/ui/Tooltip.tsx | 8 +++- 6 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 data/titles.json create mode 100644 src/components/common/Titles.tsx diff --git a/data/titles.json b/data/titles.json new file mode 100644 index 00000000..5fefdabd --- /dev/null +++ b/data/titles.json @@ -0,0 +1,10 @@ +[ + { + "name": "xLog contributor", + "link": "https://github.com/Crossbell-Box/xLog/graphs/contributors", + "list": [ + 10, 30, 12, 32022, 32179, 45, 19, 4583, 4381, 32168, 33446, 33492, 52055, + 153, 50143, 51470 + ] + } +] diff --git a/src/components/common/CharacterCard.tsx b/src/components/common/CharacterCard.tsx index be480a95..c92b43c5 100644 --- a/src/components/common/CharacterCard.tsx +++ b/src/components/common/CharacterCard.tsx @@ -7,6 +7,7 @@ import type { Profile } from "~/lib/types" import { cn } from "~/lib/utils" import { useDate } from "~/hooks/useDate" import { useTranslation } from "next-i18next" +import { Titles } from "~/components/common/Titles" export const CharacterCard: React.FC<{ siteId?: string @@ -71,11 +72,12 @@ export const CharacterCard: React.FC<{ /> )} - + {site?.name} - @{site?.username} + + @{site?.username} {site?.description && ( {comment?.character?.metadata?.content?.name} + · + ·