diff --git a/resources/js/components/commit-search-results.tsx b/resources/js/components/commit-search-results.tsx index 7c0c8723d..3f4cc9e89 100644 --- a/resources/js/components/commit-search-results.tsx +++ b/resources/js/components/commit-search-results.tsx @@ -2,6 +2,7 @@ import type { ReactNode } from 'react'; import { CommitCard } from '@/components/commit-card'; import { CommitSkeleton, EmptyFeed } from '@/components/commit-feed'; import { GraphCanvas } from '@/components/graph-canvas'; +import { authorLaneColor } from '@/lib/utils'; import type { Commit } from '@/types'; export type SearchResultSet = { term: string; commits: Commit[] }; @@ -11,11 +12,13 @@ export function SearchResults({ isWaiting = false, heading = 'Most relevant commits', empty = 'Try describing the idea in other words, or pick one of the searches below.', + isStandalone = false, }: { results: SearchResultSet | null; isWaiting?: boolean; heading?: string; empty?: ReactNode; + isStandalone?: boolean; }) { if (results === null) { return ( @@ -55,13 +58,33 @@ export function SearchResults({ ) : ( - {results.commits.map((commit) => ( - - ))} + {results.commits.map((commit, index) => { + if (isStandalone) { + return ( + + ); + } + + const previous = results.commits[index - 1]; + + return ( + + ); + })} )} diff --git a/resources/js/pages/headline/show.tsx b/resources/js/pages/headline/show.tsx index 47ea89617..d0ef917e1 100644 --- a/resources/js/pages/headline/show.tsx +++ b/resources/js/pages/headline/show.tsx @@ -43,6 +43,7 @@ export default function Show({ results={results} heading="What nullers have been saying" empty="No matching commits from the past week." + isStandalone /> );