Skip to content

Commit

Permalink
#1320 Displaying the accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoraboeuf committed Jul 8, 2024
1 parent f755273 commit b7c062f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ontrack-web-core/components/search/SearchResult.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import {Dynamic} from "@components/common/Dynamic";
import {Space} from "antd";
import SearchResultType from "@components/search/SearchResultType";
import SearchResultAccuracy from "@components/search/SearchResultAccuracy";

export default function SearchResult({result}) {
return (
<>
<Space>
<SearchResultType type={result.type}/>
<Space direction="vertical" size={8}>
<SearchResultType type={result.type}/>
<SearchResultAccuracy accuracy={result.accuracy}/>
</Space>
<Dynamic path={`framework/search/${result.type.id}/Result`} props={result}/>
</Space>
</>
Expand Down
9 changes: 9 additions & 0 deletions ontrack-web-core/components/search/SearchResultAccuracy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {Typography} from "antd";

export default function SearchResultAccuracy({accuracy}) {
return (
<>
<Typography.Text type="secondary" title="Accuracy of the match">{accuracy.toFixed(1)}</Typography.Text>
</>
)
}

0 comments on commit b7c062f

Please sign in to comment.