]> Untitled Git - lemmy-ui.git/commitdiff
Search only communities by default when coming from communities page
authorRaicuparta <Raicuparta@users.noreply.github.com>
Thu, 29 Jun 2023 03:12:16 +0000 (04:12 +0100)
committerGitHub <noreply@github.com>
Thu, 29 Jun 2023 03:12:16 +0000 (04:12 +0100)
src/shared/components/community/communities.tsx

index a84ec055568a9394a768b265f2adc1f386bdc288..30a4280da72ae6ca2f818e662250263abdf446f6 100644 (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({