Skip to content

Commit 4e446ab

Browse files
authored
Merge pull request #2011 from delexagon/hearing-search-result-text
Hearing search result text
2 parents 6967f85 + 20cb689 commit 4e446ab

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

components/hearing/Transcriptions.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ const ClearButton = styled(FontAwesomeIcon)`
2323
cursor: pointer;
2424
`
2525

26+
const ResultNumText = styled.div`
27+
position: absolute;
28+
right: 4rem;
29+
top: 50%;
30+
user-select: none;
31+
transform: translateY(-50%);
32+
color: #979797;
33+
`
34+
2635
const ErrorContainer = styled(Container)`
2736
background-color: white;
2837
`
@@ -197,7 +206,15 @@ export const Transcriptions = ({
197206
onChange={e => setSearchTerm(e.target.value)}
198207
/>
199208
{searchTerm && (
200-
<ClearButton icon={faTimes} onClick={handleClearInput} />
209+
<>
210+
<ResultNumText>
211+
{t("num_results", {
212+
ns: "hearing",
213+
count: filteredData.length
214+
})}
215+
</ResultNumText>
216+
<ClearButton icon={faTimes} onClick={handleClearInput} />
217+
</>
201218
)}
202219
<SearchIcon icon={faMagnifyingGlass} />
203220
</SearchWrapper>

public/locales/en/hearing.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"no_results_found": "No Search Results for ”{{searchTerm}}”",
1414
"no_video_on_file": "This hearing does not yet have a video on file",
1515
"no_vote": "No Vote Recorded",
16+
"num_results_one": "{{count}} result",
17+
"num_results_other": "{{count}} results",
1618
"recording_date": "Recording date",
1719
"reserve": "Reserve",
1820
"reserve_right": "Reserve Right",

0 commit comments

Comments
 (0)