Skip to content

Commit a3ae0a9

Browse files
authored
feat(desktop): center the text in the badge (#3771)
1 parent 9c270c7 commit a3ae0a9

File tree

1 file changed

+5
-3
lines changed
  • apps/desktop/layer/renderer/src/pages/(main)/(layer)/(subview)/discover/category

1 file changed

+5
-3
lines changed

apps/desktop/layer/renderer/src/pages/(main)/(layer)/(subview)/discover/category/[category].tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Input } from "@follow/components/ui/input/Input.js"
44
import { LoadingCircle } from "@follow/components/ui/loading/index.js"
55
import { EllipsisHorizontalTextWithTooltip } from "@follow/components/ui/typography/EllipsisWithTooltip.js"
66
import { CategoryMap, RSSHubCategories } from "@follow/constants"
7+
import { cn } from "@follow/utils/utils"
78
import { keepPreviousData } from "@tanstack/react-query"
89
import { useMemo, useState } from "react"
910
import { useTranslation } from "react-i18next"
@@ -203,9 +204,10 @@ const RecommendationListItem = ({
203204
<Link
204205
to={`/discover/category/${c}`}
205206
key={c}
206-
className={`bg-accent/10 flex cursor-pointer items-center rounded-full px-2 py-0.5 duration-200 ${
207-
!RSSHubCategories.includes(c) ? "pointer-events-none opacity-50" : ""
208-
}`}
207+
className={cn(
208+
"bg-accent/10 cursor-pointer rounded-full px-2 py-0.5 leading-5 duration-200",
209+
!RSSHubCategories.includes(c) ? "pointer-events-none opacity-50" : "",
210+
)}
209211
>
210212
{RSSHubCategories.includes(c)
211213
? t(`discover.category.${c}`, { ns: "common" })

0 commit comments

Comments
 (0)