fix: discover recommendation card link button style

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-10-01 19:38:32 +08:00
parent b688848dac
commit 1ac465cbb9
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 10 additions and 1 deletions

View File

@ -25,11 +25,20 @@ export const RecommendationCard: FC<RecommendationCardProps> = memo(({ data, rou
<CardContent className="p-5 pt-0">
<ul className="space-y-1 text-sm text-muted-foreground">
{Object.keys(data.routes).map((route) => (
<li key={route} className="duration-200 hover:text-theme-foreground-hover">
<li
key={route}
className="hover:text-theme-foreground-hover"
onClick={(e) => {
;(e.target as HTMLElement).querySelector("button")?.click()
}}
tabIndex={-1}
>
<button
type="button"
className="rounded p-0.5 duration-200 hover:bg-muted hover:px-1.5"
onClick={() => {
present({
id: `recommendation-content-${route}`,
content: () => (
<RecommendationContent routePrefix={routePrefix} route={data.routes[route]} />
),