Skip to content

Commit 4ce4535

Browse files
committed
Enable unroutable recommended neighborhoods
1 parent b728777 commit 4ce4535

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/frontend/src/reducers/neighborhoods/selectors/neighborhoodsSortedWithRoutes.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import pullAt from "lodash/pullAt";
1010
import {
1111
BOOST_DOWNTOWN_RESULT_PLACE,
1212
DOWNTOWN_AREAS,
13-
MAX_TRAVEL_TIME,
1413
RESULTS_WITH_DOWNTOWN,
1514
} from "../../../constants";
1615
import { createSelector } from "@reduxjs/toolkit";
@@ -91,13 +90,12 @@ export default createSelector(
9190
n
9291
);
9392

94-
const isRoutable =
95-
(useTransit && segments.length) || !useTransit;
96-
if (isRoutable && time < MAX_TRAVEL_TIME) {
93+
// A neighborhood is not technically "routable" if:
94+
// (useTransit and !segments.length) OR time >= MAX_TRAVEL_TIME
95+
// However, we don't want to exclude non-routable neighborhoods
96+
// from recommendations entirely as they may be a valid options for someone.
97+
// For this reason, add all neighborhoods to recommended list by default.
9798
recommendedNeighborhoodsList.push(result);
98-
} else {
99-
tooFarNeighborhoodsList.push(result);
100-
}
10199
});
102100
const rankedRecommendedNeighborhoods = orderBy(
103101
recommendedNeighborhoodsList,

0 commit comments

Comments
 (0)