Skip to content

Commit 7f06e60

Browse files
committed
hjelpetekst flere treff
1 parent bc92d13 commit 7f06e60

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

xp-archive/client/contentTree/search/SearchResult.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Button, Heading, Loader } from '@navikt/ds-react';
2+
import { BodyShort, Button, Detail, Heading, Loader } from '@navikt/ds-react';
33
import { SearchResponse } from 'shared/types';
44
import { SearchResultItem } from './SearchResultItem/SearchResultItem';
55

@@ -12,7 +12,7 @@ type SearchResultProps = {
1212
};
1313

1414
export const SearchResult = ({ isLoading, searchResult, closeSearchResult }: SearchResultProps) => {
15-
const { hits, query, total } = searchResult; //TODO legg til hasMore
15+
const { hits, query, total, hasMore } = searchResult;
1616

1717
return (
1818
<div>
@@ -35,6 +35,12 @@ export const SearchResult = ({ isLoading, searchResult, closeSearchResult }: Sea
3535
{hits.map((hit) => (
3636
<SearchResultItem hit={hit} key={hit._id + hit.layerLocale} />
3737
))}
38+
{hasMore && (
39+
<Detail>
40+
Viser de første 1000 treffene. Prøv å avgrens søket om du ikke fant det
41+
du lette etter.
42+
</Detail>
43+
)}
3844
</div>
3945
)}
4046
</div>

0 commit comments

Comments
 (0)