search: add results counter with styling
This commit is contained in:
@@ -55,7 +55,7 @@ const PAGE_TYPES: Record<string, string> = {
|
||||
|
||||
function SearchResults({ results }: { results: any }) {
|
||||
if (!results.length) {
|
||||
return <div>Ingen resultater 😔</div>;
|
||||
return <div className={styles.noResults}>Ingen resultater</div>;
|
||||
}
|
||||
const supportedResults = results.filter(
|
||||
(result: any) =>
|
||||
@@ -63,6 +63,7 @@ function SearchResults({ results }: { results: any }) {
|
||||
);
|
||||
return (
|
||||
<div>
|
||||
<p className={styles.resultsCounter}>{results.length} resultater</p>
|
||||
{supportedResults.map((result: any) => {
|
||||
let resultType = PAGE_TYPES[result.__typename] ?? "";
|
||||
if (result.__typename === "AssociationPage") {
|
||||
|
||||
Reference in New Issue
Block a user