Skip to content

Commit

Permalink
Merge branch 'hotfix-1.0.57'
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed May 21, 2021
2 parents 8f2378c + 5a43825 commit fa730f5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 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.56",
"version": "1.0.57",
"author": "Hack for LA",
"license": "GPL-2.0",
"private": true,
Expand Down
1 change: 1 addition & 0 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ function App() {
<VerificationAdmin
user={user}
userCoordinates={userCoordinates}
origin={origin}
/>
</div>
</ThemeProvider>
Expand Down
23 changes: 16 additions & 7 deletions client/src/components/Admin/VerificationAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,14 @@ VerificationAdmin.propTypes = {
latitude: PropTypes.number,
longitude: PropTypes.number,
}),
origin: PropTypes.shape({
latitude: PropTypes.number,
longitude: PropTypes.number,
}),
};

function VerificationAdmin(props) {
const { user, userCoordinates } = props;
const { user, userCoordinates, origin } = props;
const classes = useStyles();
const [dialogOpen, setDialogOpen] = useState(false);
const [assignDialogOpen, setAssignDialogOpen] = useState(false);
Expand Down Expand Up @@ -159,8 +163,8 @@ function VerificationAdmin(props) {
if (!initialCriteria) {
initialCriteria = {
...defaultCriteria,
latitude: userCoordinates.latitude,
longitude: userCoordinates.longitude,
latitude: userCoordinates?.latitude || origin?.latitude || 0,
longitude: userCoordinates?.longitude || origin?.longitude || 0,
verificationStatusId: 0,
};
} else {
Expand All @@ -180,7 +184,7 @@ function VerificationAdmin(props) {
}
};
execute();
}, [userCoordinates, searchCallback]);
}, [userCoordinates, origin, searchCallback]);

const search = async () => {
try {
Expand Down Expand Up @@ -326,11 +330,16 @@ function VerificationAdmin(props) {
<div style={{ overflowY: "scroll" }}>
<SearchCriteria
key={JSON.stringify({
userLatitude: userCoordinates.latitude,
userLatitude:
userCoordinates?.latitude || origin?.latitude || 0,
categories,
})}
userLatitude={userCoordinates.latitude}
userLongitude={userCoordinates.longitude}
userLatitude={
userCoordinates?.latitude || origin?.latitude || 0
}
userLongitude={
userCoordinates?.longitude || origin?.longitude || 0
}
categories={categories && categories.filter((c) => !c.inactive)}
neighborhoods={neighborhoods}
criteria={criteria}
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.56",
"version": "1.0.57",
"author": "Hack for LA",
"description": "Web API Server for Food Oasis",
"main": "server.js",
Expand Down

0 comments on commit fa730f5

Please sign in to comment.