Skip to content

Commit

Permalink
[GAL-5222] Community -> Collection in search results (#2330)
Browse files Browse the repository at this point in the history
* community -> collection on web

* mobile

* typecheck
  • Loading branch information
Robinnnnn authored Feb 23, 2024
1 parent ec98b69 commit f705501
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/src/components/Search/SearchFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const filters: FilterElement = [
value: 'gallery',
},
{
label: 'Communities',
label: 'Collections',
value: 'community',
},
];
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/components/Search/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export function SearchResults({
items.push({
kind: 'search-section-header',
sectionType: 'community',
sectionTitle: 'Communities',
sectionTitle: 'Collections',
numberOfResults: searchCommunities.results.length,
});

Expand Down Expand Up @@ -244,7 +244,7 @@ export function SearchResults({
items.push({
kind: 'search-section-header',
sectionType: 'community',
sectionTitle: 'Communities',
sectionTitle: 'Collections',
numberOfResults: searchCommunities.results.length,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function CommunitySearchResultSection({
<SearchSection
title={title}
isShowAll={isShowAll}
onShowAll={() => onChangeFilter('community')}
onShowAll={() => onChangeFilter('collection')}
numResults={results.length}
variant={variant}
>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import SearchInput from './SearchInput';
import SearchResults from './SearchResults';
import { SearchItemType } from './types';

export type SearchFilterType = 'top' | 'curator' | 'gallery' | 'community' | null;
export type SearchFilterType = 'top' | 'curator' | 'gallery' | 'collection' | null;

export default function Search() {
const [selectedFilter, setSelectedFilter] = useState<SearchFilterType>(null);
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Search/SearchFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const filters: FilterElement = [
value: 'gallery',
},
{
label: 'Communities',
value: 'community',
label: 'Collections',
value: 'collection',
},
];

Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Search/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ export default function SearchResults({
);
}

if (activeFilter === 'community') {
if (activeFilter === 'collection') {
return (
<StyledSearchResultContainer isLoading={isLoading}>
{query?.searchCommunities?.__typename === 'SearchCommunitiesPayload' && (
<CommunitySearchResultSection
title="communities"
title="collections"
resultRefs={query?.searchCommunities?.results}
onChangeFilter={onChangeFilter}
isShowAll
Expand Down

0 comments on commit f705501

Please sign in to comment.