Link coaches to their chesscom/lichess page.
parent
54c7d14669
commit
2a4d969030
|
@ -5,7 +5,7 @@ type SearchResultProps = {
|
|||
title?: string
|
||||
subtitle?: string
|
||||
src?: string
|
||||
} & React.ComponentPropsWithoutRef<"div">
|
||||
} & React.ComponentPropsWithoutRef<"a">
|
||||
|
||||
export function SearchResult({
|
||||
title,
|
||||
|
@ -15,7 +15,7 @@ export function SearchResult({
|
|||
...props
|
||||
}: SearchResultProps) {
|
||||
return (
|
||||
<div
|
||||
<a
|
||||
className={clsx(
|
||||
"group relative h-96 overflow-hidden rounded-3xl bg-neutral-100",
|
||||
className
|
||||
|
@ -36,6 +36,6 @@ export function SearchResult({
|
|||
<p className="mt-2 text-sm text-white">{subtitle}</p>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -38,6 +38,14 @@ function SearchResults() {
|
|||
src={coach.image_url ?? ""}
|
||||
title={coach.name ?? ""}
|
||||
subtitle={coach.name ?? ""}
|
||||
target="_blank"
|
||||
href={
|
||||
coach.site === "lichess"
|
||||
? `https://lichess.org/coach/${coach.username}`
|
||||
: coach.site === "chesscom"
|
||||
? `https://www.chess.com/member/${coach.username}`
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</FadeIn>
|
||||
))}
|
||||
|
|
Loading…
Reference in New Issue