Skip to content

Commit 648ce7e

Browse files
committed
removed filter feature flag
1 parent 042bc22 commit 648ce7e

4 files changed

Lines changed: 6 additions & 25 deletions

File tree

client/src/components/FoodSeeker/SearchResults/ResultsFilters/ResultsFilters.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const ResultsFilters: FC<ResultsFiltersProps> = ({
2929
>
3030
<Grid2
3131
display={{ xs: "none", sm: "block" }}
32-
sm="auto"
32+
sm={4}
3333
sx={{
3434
paddingLeft: "1rem",
3535
}}
@@ -50,7 +50,7 @@ const ResultsFilters: FC<ResultsFiltersProps> = ({
5050
<Grid2
5151
container
5252
xs={12}
53-
sm={true}
53+
sm={8}
5454
justifyContent="center"
5555
alignItems="center"
5656
>

client/src/components/FoodSeeker/SearchResults/ResultsMap/ResultsMap.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import RemoveIcon from "@mui/icons-material/RemoveRounded";
1515
import { MAPBOX_STYLE } from "constants/map";
1616
import { MAPBOX_ACCESS_TOKEN, DEFAULT_VIEWPORT } from "helpers/Constants";
1717
import useBreakpoints from "hooks/useBreakpoints";
18-
import useFeatureFlag from "hooks/useFeatureFlag";
1918
import "mapbox-gl/dist/mapbox-gl.css";
2019
import Map, { Layer, Marker, Source } from "react-map-gl";
2120
import { useLocation, useNavigate } from "react-router-dom";
@@ -110,7 +109,6 @@ const ResultsMap = ({
110109
const neighborhood = useNeighborhood() as { geojson?: any } | null;
111110
const regionGeoJSON = neighborhood?.geojson;
112111
const startIconCoordinates = searchCoordinates || userCoordinates;
113-
const hasAdvancedFilterFeatureFlag = useFeatureFlag("advancedFilter");
114112

115113
const onMouseEnter = useCallback(() => setCursor("pointer"), []);
116114
const onMouseLeave = useCallback(() => setCursor("auto"), []);
@@ -461,7 +459,8 @@ const ResultsMap = ({
461459
</Source>
462460
)}
463461
</Map>
464-
{!loading && hasAdvancedFilterFeatureFlag && (
462+
463+
{!loading && (
465464
<Grid
466465
container={isMobile}
467466
wrap={isMobile ? "nowrap" : undefined}

client/src/components/FoodSeeker/SearchResults/SearchResults.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,6 @@ const SearchResults = () => {
116116
}
117117
}, [positionDraggable]);
118118

119-
// USE EFFECT BASED ON THIS FUNCTION IN Mobile.js
120-
// const handleStop = (e, ui) => {
121-
// const windowHeight = window.innerHeight / 100;
122-
// let newY;
123-
// if (ui.y < 20 * windowHeight) {
124-
// newY = hasAdvancedFilterFeatureFlag ? (100 / window.innerHeight) * 60 : 0;
125-
// } else if (ui.y > 20 * windowHeight && ui.y < 40 * windowHeight) {
126-
// newY = 17;
127-
// } else if (ui.y > 40 * windowHeight) {
128-
// newY = 54;
129-
// }
130-
// setPosition({ x: 0, y: newY * windowHeight });
131-
// };
132-
133119
// If path starts with "widget", then set the state variable isWidget to true,
134120
// so we stay in widget mode (w/o normal App Header and Footer)
135121
useEffect(() => {

client/src/components/FoodSeeker/SearchResults/layouts/Mobile.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Draggable, { DraggableEvent, DraggableData } from "react-draggable";
44
import { useFilterPanel } from "appReducer";
55
import AttributionInfo from "../AttributionInfo";
66
import { useAppDispatch } from "../../../../appReducer";
7-
import useFeatureFlag from "hooks/useFeatureFlag";
87

98
const getOverlayStyle = (positionY: number) => ({
109
position: "absolute" as const,
@@ -29,7 +28,6 @@ interface MobileLayoutProps {
2928
const MobileLayout: FC<MobileLayoutProps> = ({ filters, map, list, showList }) => {
3029
const filterPanelOpen = useFilterPanel();
3130
const initialY = showList ? 5 : 57;
32-
const hasAdvancedFilterFeatureFlag = useFeatureFlag("advancedFilter");
3331
const dispatch = useAppDispatch();
3432
const [position, setPosition] = useState({
3533
x: 0,
@@ -49,17 +47,15 @@ const MobileLayout: FC<MobileLayoutProps> = ({ filters, map, list, showList }) =
4947
}
5048

5149
setPosition({ x: 0, y: newY * (window.innerHeight / 100) });
52-
}, [showList, filterPanelOpen, hasAdvancedFilterFeatureFlag]);
50+
}, [showList, filterPanelOpen]);
5351

5452
const handleDrag = (e: DraggableEvent, ui: DraggableData) => {
5553
setPosition({ x: 0, y: ui.y });
5654
};
5755

5856
const handleStop = (e: DraggableEvent, ui: DraggableData) => {
5957
const windowHeight = window.innerHeight / 100;
60-
const minY = hasAdvancedFilterFeatureFlag
61-
? (100 / window.innerHeight) * 60
62-
: 0;
58+
const minY = (100 / window.innerHeight) * 60;
6359
const maxY = 80;
6460
const snapPoints = [minY, 35, maxY];
6561
const snapThreshold = 5;

0 commit comments

Comments
 (0)