diff --git a/assets/js/react/components/SearchResult.tsx b/assets/js/react/components/SearchResult.tsx index 32f24fa..7d3821e 100644 --- a/assets/js/react/components/SearchResult.tsx +++ b/assets/js/react/components/SearchResult.tsx @@ -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 ( -
{subtitle}

) : null}
- + ) } diff --git a/assets/js/react/pages/Search.tsx b/assets/js/react/pages/Search.tsx index 37a3e5c..f6131ae 100644 --- a/assets/js/react/pages/Search.tsx +++ b/assets/js/react/pages/Search.tsx @@ -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 + } /> ))}