Skip to content

Commit

Permalink
Merge branch 'release-1.0.54'
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed May 13, 2021
2 parents 31e4949 + b558ad0 commit c5bfd9a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 33 deletions.
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "foodoasis-client",
"description": "React Client for Food Oasis",
"version": "1.0.53",
"version": "1.0.54",
"author": "Hack for LA",
"license": "GPL-2.0",
"private": true,
Expand Down
3 changes: 1 addition & 2 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ function App() {
}, []);

useEffect(() => {
const result = analytics.postEvent("visitAppComponent");
console.error(result);
analytics.postEvent("visitAppComponent");
}, []);

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions client/src/components/FoodSeeker/MarkerHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const markersLayerStyles = {
"icon-image": ["get", "iconId"],
"icon-allow-overlap": true,
"icon-size": 1 / MARKER_SCALE,
"icon-anchor": "bottom",
},
}

Expand Down
34 changes: 18 additions & 16 deletions client/src/components/FoodSeeker/ResultsFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const ResultsFilters = ({
return (
<Grid item container className={classes.controlPanel}>
{!mobileView && (
<Grid item xs={0} sm={4} className={classes.taglineContainer}>
<Grid item sm={4} className={classes.taglineContainer}>
<Typography variant="h6" className={classes.tagline}>
{taglineText}
</Typography>
Expand Down Expand Up @@ -275,21 +275,23 @@ const ResultsFilters = ({
browserLocation={browserLocation}
/>
<Tooltip title="Re-center">
<Button
onClick={() => {
analytics.postEvent("recenterMap", {});
setOrigin(userCoordinates);
handleSearch();
}}
disabled={
!userCoordinates.latitude || !userCoordinates.longitude
}
variant="contained"
className={classes.nearbySearch}
startIcon={
<LocationSearchingIcon className={classes.nearbyIcon} />
}
/>
<span>
<Button
onClick={() => {
analytics.postEvent("recenterMap", {});
setOrigin(userCoordinates);
handleSearch();
}}
disabled={
!userCoordinates.latitude || !userCoordinates.longitude
}
variant="contained"
className={classes.nearbySearch}
startIcon={
<LocationSearchingIcon className={classes.nearbyIcon} />
}
/>
</span>
</Tooltip>

{/* <Button
Expand Down
27 changes: 14 additions & 13 deletions client/src/components/FoodSeeker/ResultsMapOptimized.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ const useStyles = makeStyles((theme) => ({
flexDirection: "column",
alignItems: "center",
padding: "0 1em",
position: "absolute",
height: "100%",
backgroundColor: theme.palette.background.default,
zIndex: 10000,
},
searchButton: {
position: "absolute",
Expand Down Expand Up @@ -107,7 +111,7 @@ function Map({
const [showDetails, setShowDetails] = useState(false);
const [showSearchArea, setShowSearchArea] = useState(false);
const [mapReady, setMapReady] = useState(false);
const classes = useStyles();
const classes = useStyles({ selectedStakeholder });
const mapRef = useRef();
const categoryIdsOrDefault = categoryIds.length
? categoryIds
Expand Down Expand Up @@ -198,18 +202,6 @@ function Map({

const mobileView = isMobile();

if (showDetails && mobileView && selectedStakeholder) {
return (
<Grid item xs={12} md={4} className={classes.details}>
<StakeholderDetails
doSelectStakeholder={unselectStakeholder}
selectedStakeholder={selectedStakeholder}
setToast={setToast}
/>
</Grid>
);
}

return (
<>
<Grid item xs={12} md={8} className={classes.map}>
Expand Down Expand Up @@ -276,6 +268,15 @@ function Map({
/>
</Grid>
)}
{!!selectedStakeholder && mobileView && showDetails && (
<Grid item xs={12} md={4} className={classes.details}>
<StakeholderDetails
doSelectStakeholder={unselectStakeholder}
selectedStakeholder={selectedStakeholder}
setToast={setToast}
/>
</Grid>
)}
</>
);
}
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "foodoasis-web-api",
"version": "1.0.53",
"version": "1.0.54",
"author": "Hack for LA",
"description": "Web API Server for Food Oasis",
"main": "server.js",
Expand Down

0 comments on commit c5bfd9a

Please sign in to comment.