setIsoData,
showLocal,
} from "@utils/app";
-import { isBrowser } from "@utils/browser";
import {
getPageFromString,
getQueryParams,
this.handleListingTypeChange = this.handleListingTypeChange.bind(this);
// Only fetch the data if coming from another route
- if (!isBrowser() || FirstLoadService.isFirstLoad) {
+ if (FirstLoadService.isFirstLoad) {
const { listCommunitiesResponse } = this.isoData.routeData;
this.state = {
const { listingType, page } = this.getCommunitiesQueryParams();
return (
<div>
- <h1 className="h4">
+ <h1 className="h4 mb-4">
{I18NextService.i18n.t("list_of_communities")}
</h1>
<div className="row g-2 justify-content-between">
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({