Search only communities by default when coming from communities page

This commit is contained in:
Raicuparta 2023-06-29 04:12:16 +01:00 committed by GitHub
parent 4674f6ff57
commit 92f6fe914f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -284,7 +284,7 @@ export class Communities extends Component<any, CommunitiesState> {
handleSearchSubmit(i: Communities, event: any) {
event.preventDefault();
const searchParamEncoded = encodeURIComponent(i.state.searchText);
i.context.router.history.push(`/search?q=${searchParamEncoded}`);
i.context.router.history.push(`/search?q=${searchParamEncoded}&type=Communities`);
}
static async fetchInitialData({