Skip to content

Commit

Permalink
fix(web): Change search filter (#17705)
Browse files Browse the repository at this point in the history
* fix: missing tag

* fix: add status to mobile filter

* fix: filter
  • Loading branch information
thorkellmani authored and RunarVestmann committed Jan 29, 2025
1 parent 4ada79b commit 8963faa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/web/screens/Grants/SearchResults/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ const GrantsSearchResultsPage: CustomScreen<GrantsHomeProps> = ({
tags={tags ?? []}
url={currentUrl}
variant={'default'}
hits={totalHits}
/>
</Box>
}
Expand Down Expand Up @@ -362,12 +363,14 @@ const GrantsSearchResultsPage: CustomScreen<GrantsHomeProps> = ({
category: categories ?? undefined,
type: types ?? undefined,
organization: organizations ?? undefined,
status: status ?? undefined,
}}
onSearchUpdate={onSearchFilterUpdate}
onReset={onResetFilter}
tags={tags ?? []}
url={currentUrl}
variant={'popover'}
variant={'dialog'}
hits={totalHits}
/>
</Box>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface Props {
tags: Array<GenericTag>
url: string
variant?: FilterProps['variant']
hits?: number
}

export const GrantsSearchResultsFilter = ({
Expand All @@ -38,6 +39,7 @@ export const GrantsSearchResultsFilter = ({
tags,
url,
variant = 'default',
hits,
}: Props) => {
const { formatMessage } = useIntl()

Expand Down Expand Up @@ -67,7 +69,8 @@ export const GrantsSearchResultsFilter = ({
labelClose={formatMessage(m.search.closeFilter)}
labelClear={formatMessage(m.search.clearFilterCategory)}
labelTitle={formatMessage(m.search.filterTitle)}
labelResult={formatMessage(m.search.resultFound)}
labelResult={formatMessage(m.search.viewResults)}
resultCount={hits}
onFilterClear={onReset}
variant={variant}
align={'left'}
Expand Down
4 changes: 4 additions & 0 deletions apps/web/screens/Grants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ export const m = {
id: 'web.grants:search.type',
defaultMessage: 'Tegund',
},
viewResults: {
id: 'web.grants:search.viewResults',
defaultMessage: 'Skoða niðurstöður',
},
resultFound: {
id: 'web.grants:search.resultFound',
defaultMessage: '{arg} styrkur fannst',
Expand Down

0 comments on commit 8963faa

Please sign in to comment.