Places in {place.name}
- {childPlaces.map((place) => (
+ {(isCollapsed ? truncatedPlaces : childPlaces).map((place) => (
+ {showToggle && (
+
+
+ {isCollapsed ? `Show ${numPlacesCollapsed} more` : "Show less"}
+
+
+ {isCollapsed ? "expand_more" : "expand_less"}
+
+
+ )}
);
};
diff --git a/static/js/place/place.ts b/static/js/place/place.ts
index d627133cae..f146e9c23b 100644
--- a/static/js/place/place.ts
+++ b/static/js/place/place.ts
@@ -20,7 +20,6 @@ import React from "react";
import ReactDOM from "react-dom";
import { PageData } from "../chart/types";
-import { NlSearchBar } from "../components/nl_search_bar";
import { loadLocaleData } from "../i18n/i18n";
import {
GA_EVENT_NL_SEARCH,
@@ -34,13 +33,8 @@ import { MainPane, showOverview } from "./main_pane";
import { Menu } from "./menu";
import { PageSubtitle } from "./page_subtitle";
import { PlaceHighlight } from "./place_highlight";
-import { PlaceSearch } from "./place_search";
import { isPlaceInUsa } from "./util";
-// Temporarily hide NL search bar on frontend until backend pipelines are
-// implemented.
-const SHOW_NL_SEARCH_BAR = false;
-
// Window scroll position to start fixing the sidebar.
let yScrollLimit = 0;
// Max top position for the sidebar, relative to #sidebar-outer.
@@ -198,24 +192,6 @@ function renderPage(): void {
const data: PageData = landingPageData;
const isUsaPlace = isPlaceInUsa(dcid, data.parentPlaces);
- if (SHOW_NL_SEARCH_BAR) {
- ReactDOM.render(
- React.createElement(NlSearchBar, {
- initialValue: "",
- inputId: "query-search-input",
- onSearch,
- placeholder: `Enter a question to explore`,
- shouldAutoFocus: false,
- }),
- document.getElementById("nl-search-bar")
- );
- }
-
- ReactDOM.render(
- React.createElement(PlaceSearch, {}),
- document.getElementById("place-search-container")
- );
-
ReactDOM.render(
React.createElement(Menu, {
pageChart: data.pageChart,