Skip to content

Commit 1b80bb6

Browse files
committed
Handle tablet view and center red marker
1 parent 4a90042 commit 1b80bb6

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const ResultsMap = ({ stakeholders, categoryIds, toggleCategory, loading }) => {
160160
latitude={startIconCoordinates.latitude}
161161
offsetTop={-50}
162162
offsetLeft={-25}
163-
anchor="bottom"
163+
anchor="center"
164164
>
165165
<StartIcon />
166166
</Marker>
@@ -218,8 +218,8 @@ const StartIcon = () => {
218218
return (
219219
<svg
220220
viewBox="0 0 90 100"
221-
width="54"
222-
height="74"
221+
width="44"
222+
height="64"
223223
fill="none"
224224
xmlns="http://www.w3.org/2000/svg"
225225
>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ const MobileLayout = ({ filters, map, list, showList }) => {
4141
let newY;
4242
if (filterPanelOpen) {
4343
newY = 100;
44-
} else if (hasAdvancedFilterFeatureFlag) {
45-
newY = showList ? (100 / window.innerHeight) * 60 : 54;
4644
} else {
4745
newY = showList ? 17 : 54;
4846
}

client/src/hooks/useMapbox.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useMap } from "react-map-gl";
66
export const useMapbox = () => {
77
const mapRef = useRef();
88
const isListPanelOpen = useListPanel();
9-
const { isMobile } = useBreakpoints();
9+
const { isMobile, isDesktop } = useBreakpoints();
1010
const mapbox = useMap();
1111

1212
const getViewport = () => {
@@ -29,8 +29,8 @@ export const useMapbox = () => {
2929
}
3030
mapbox.default.flyTo({
3131
center: [
32-
isListPanelOpen && !isMobile ? longitude - 0.08 : longitude,
33-
isMobile ? latitude - 0.05 : latitude,
32+
isListPanelOpen && isDesktop ? longitude - 0.08 : longitude,
33+
isMobile ? latitude - 0.04 : latitude,
3434
],
3535
duration: 2000,
3636
});

0 commit comments

Comments
 (0)