Skip to content

Commit

Permalink
Merge branch 'release-1.0.26' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed Oct 14, 2020
2 parents 0d0a24a + e181f3b commit 29319e4
Show file tree
Hide file tree
Showing 22 changed files with 152 additions and 251 deletions.
4 changes: 3 additions & 1 deletion app/services/EmailTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ module.exports = function applyEmailTemplate(emailBody, baseUrl) {
<a href="https://foodoasis.la/">
<img src="${baseUrl}/FoodOasisLogo.png" alt="Food Oasis Logo" title="Food Oasis Logo" height="55" style="border:0;">
</a>
<p class="header" style="font-size:20px;line-height:23px;text-align:center;Margin-top:8px !important;Margin-bottom:.25em !important;">Your free food directory</p>
<p class="header" style="font-size:20px;line-height:23px;text-align:center;Margin-top:8px !important;Margin-bottom:.25em !important;">
Your free food directory
</p>
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "food-oasis-client",
"description": "React Client for Food Oasis",
"version": "1.0.25",
"version": "1.0.26",
"author": "Hack for LA",
"license": "GPL-2.0",
"private": true,
Expand Down
12 changes: 5 additions & 7 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { makeStyles, ThemeProvider } from "@material-ui/core/styles";
import { Grid } from "@material-ui/core";
import theme from "theme/materialUI";
import { logout } from "services/account-service";
import { getTenantId } from "helpers/Configuration";
import { tenantId, originCoordinates } from "helpers/Configuration";

// Components
import { UserContext } from "components/user-context";
Expand Down Expand Up @@ -35,7 +35,6 @@ import Home from "containers/Home";
import Results from "components/Results/ResultsContainer";
import Suggestion from "components/Suggestion";
import newTheme from "./theme/newTheme";
import { defaultCoordinates } from "./helpers/Configuration";

const useStyles = makeStyles({
app: (props) => ({
Expand Down Expand Up @@ -71,14 +70,13 @@ const useStyles = makeStyles({
});

function App() {
const tenantId = getTenantId();
const [user, setUser] = useState(null);
const [userCoordinates, setUserCoordinates] = useState({});
const [toast, setToast] = useState({ message: "" });
const [bgImg, setBgImg] = useState("");
const [origin, setOrigin] = useState({
latitude: defaultCoordinates.lat,
longitude: defaultCoordinates.lon,
latitude: originCoordinates.lat,
longitude: originCoordinates.lon,
});

useEffect(() => {
Expand Down Expand Up @@ -129,8 +127,8 @@ function App() {
(error) => {
console.log(`Getting browser location failed: ${error.message}`);
const userCoordinates = {
latitude: defaultCoordinates.lat,
longitude: defaultCoordinates.lon,
latitude: originCoordinates.lat,
longitude: originCoordinates.lon,
};
setUserCoordinates(userCoordinates);
}
Expand Down
7 changes: 1 addition & 6 deletions client/src/components/Buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,7 @@ const DeleteButton = (props) => {

const DeleteIconButton = (props) => {
return (
<IconButton
variant="contained"
color="default"
aria-label="delete"
{...props}
>
<IconButton variant="contained" aria-label="delete" {...props}>
<Delete />
</IconButton>
);
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Link } from "react-router-dom";
// The two tenant logos happen to be the same at this moment
import logo from "images/foodoasis.svg";
import logoCA from "images/foodoasis.svg";
import { getTenantId } from "../helpers/Configuration";
import { tenantId } from "../helpers/Configuration";

const useStyles = makeStyles((theme) => ({
footer: {
Expand Down Expand Up @@ -100,7 +100,7 @@ const Footer = () => {

return (
<Box className={classes.footer} style={holderStyle}>
{getTenantId() === 2 ? (
{tenantId === 2 ? (
<img src={logoCA} className={classes.logo} alt="logo" />
) : (
<img src={logo} className={classes.logo} alt="logo" />
Expand Down
18 changes: 12 additions & 6 deletions client/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import logo from "images/foodoasis.svg";
import logoCA from "images/foodoasis.svg";
import { AppBar, Toolbar, Typography } from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import { getTenantId } from "../helpers/Configuration";
import { tenantId } from "../helpers/Configuration";

Header.propTypes = {
user: PropTypes.object,
setUser: PropTypes.func,
setToast: PropTypes.func,
};

const useStyles = makeStyles({
const useStyles = makeStyles((theme) => ({
headerHolder: {
backgroundColor: (props) => props.headerColor,
marginBottom: (props) => props.headerMargin,
Expand All @@ -24,6 +24,10 @@ const useStyles = makeStyles({
header: {
minHeight: "60px",
padding: "0 1.5em 0 0",
[theme.breakpoints.down("xs")]: {
padding: "0 0.5em 0 0",
minHeight: "45px",
},
},
content: {
display: "flex",
Expand All @@ -35,10 +39,12 @@ const useStyles = makeStyles({
width: "90px",
height: "60px",
margin: "0 .5rem",

"&:hover": {
filter: "brightness(1.2)",
},
[theme.breakpoints.down("xs")]: {
height: "45px",
},
},
tagline: {
color: "#1b1b1b",
Expand All @@ -47,7 +53,7 @@ const useStyles = makeStyles({
lineHeight: "1.5",
fontFamily: `"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans- serif`,
},
});
}));

export default function Header(props) {
const { user, setUser, setToast } = props;
Expand All @@ -66,15 +72,15 @@ export default function Header(props) {

const styles = isHomePage ? homePageStyles : defaultStyles;
const classes = useStyles(styles);
const taglineText = isHomePage ? "" : "Your free food directory";
const taglineText = ""; // isHomePage ? "" : "Your free food directory";

return (
<>
<AppBar position="sticky" className={classes.headerHolder}>
<Toolbar className={classes.header}>
<div className={classes.content}>
{!isHomePage &&
(getTenantId() === 1 ? (
(tenantId === 1 ? (
<div>
<a href="/">
<img src={logo} className={classes.logo} alt="logo" />{" "}
Expand Down
9 changes: 5 additions & 4 deletions client/src/components/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,24 @@ Menu.propTypes = {
setToast: PropTypes.func,
};

const useStyles = makeStyles({
const useStyles = makeStyles((theme) => ({
list: {
width: 250,
},
menuButton: {
transform: "scale(1.6,1.5)",
backgroundColor: "#FFF",
padding: "0.5rem",
minWidth: "0",
"&:hover": {
backgroundColor: "#FFF",
},
[theme.breakpoints.down("xs")]: {
transform: "scale(1.2, 1.2)",
},
},
blueMenu: {
fill: "#19334D",
},
});
}));

export default function Menu(props) {
const isHomePage = useLocationHook();
Expand Down
16 changes: 3 additions & 13 deletions client/src/components/Results/ResultsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,13 @@ import { Grid } from "@material-ui/core";
import { useOrganizationBests } from "hooks/useOrganizationBests";
import useCategoryIds from "hooks/useCategoryIds";
import { isMobile } from "helpers";
import { defaultCoordinates } from "../../helpers/Configuration";
import { originCoordinates } from "../../helpers/Configuration";

import Filters from "./ResultsFilters";
import List from "./ResultsList";
import Map from "./ResultsMap";

const useStyles = makeStyles((theme) => ({
filterButton: {
margin: "0 .25rem",
padding: "0 0.5rem",
fontSize: "12px",
},
div: {
textAlign: "center",
fontSize: "12px",
border: "1px solid blue",
},
listMapContainer: {
[theme.breakpoints.down("sm")]: {
height: "100%",
Expand Down Expand Up @@ -79,14 +69,14 @@ export default function ResultsContainer(props) {
? JSON.parse(storage.origin).latitude
: userCoordinates
? userCoordinates.latitude
: defaultCoordinates.lat,
: originCoordinates.lat,
longitude: userSearch
? userSearch.longitude
: storage.origin
? JSON.parse(storage.origin).longitude
: userCoordinates
? userCoordinates.longitude
: defaultCoordinates.lon,
: originCoordinates.lon,
};

const [radius, setRadius] = useState(
Expand Down
Loading

0 comments on commit 29319e4

Please sign in to comment.