From 1b99fd1c8f52d6d8144555ee1e2a2d16b4bbe6c0 Mon Sep 17 00:00:00 2001 From: June Zhao Date: Mon, 18 Sep 2023 19:32:44 -0700 Subject: [PATCH] Updated Home.js component style to using sx --- client/src/components/FoodSeeker/Home.js | 231 +++++++++++++---------- 1 file changed, 129 insertions(+), 102 deletions(-) diff --git a/client/src/components/FoodSeeker/Home.js b/client/src/components/FoodSeeker/Home.js index 98c0de83c..0462124fe 100644 --- a/client/src/components/FoodSeeker/Home.js +++ b/client/src/components/FoodSeeker/Home.js @@ -25,94 +25,7 @@ const logoPaths = { 6: require("images/foodoasis.svg").default, }; -const useStyles = makeStyles((theme) => ({ - homeWrapper: { - backgroundSize: "cover", - backgroundPosition: "center", - backgroundImage: 'url("/landing-page/map.png")', // replaced the background image style inside useStyles instead of inline styling - minHeight: "max(100.7vh,20em)", - display: "flex", - flexDirection: "column", - justifyContent: "center", - alignItems: "center", - [theme.breakpoints.down("sm")]: { - height: "100%", - }, - }, - container: { - maxWidth: "650px", - [theme.breakpoints.down("sm")]: { - padding: 0, - height: "100%", - }, - }, - paper: { - margin: "0 auto", - padding: "3.5rem 0.5rem 3rem 0.5rem", - display: "flex", - flexDirection: "column", - alignItems: "center", - borderRadius: "24px", - boxShadow: "0px 5px 8px 0px rgb(0, 0, 0, 40%)", - [theme.breakpoints.down("sm")]: { - height: "100%", - borderRadius: "0", - paddingTop: "10rem", - justifyContent: "start", - boxShadow: "none", - }, - }, - subtitle: { - marginTop: theme.spacing(1), - fontWeight: "500", - fontSize: "18.72px", - marginBottom: "0.5em", - textAlign: "center", - }, - form: { - width: "100%", - marginTop: theme.spacing(1), - }, - formContainer: { - width: "100%", - padding: "5px 15px 15px 15px", - color: "#000000", - [theme.breakpoints.up("sm")]: { - paddingInline: "90px", - }, - }, - inputContainer: { - display: "flex", - alignItems: "flex-start", - justifyContent: "center", - marginBottom: "1em", - fontSize: "16px", - }, - endAdornment: { - display: "none", - }, - logo: { - width: "60%", - height: "auto", - textAlign: "center", - [theme.breakpoints.up("sm")]: { - width: "40%", - }, - }, - searchIcon: { - width: 32, - height: 32, - }, - learnMore: { - fontSize: "16px", - [theme.breakpoints.up("sm")]: { - fontSize: "19px", - }, - }, -})); - const Home = () => { - const classes = useStyles(); const navigate = useNavigate(); const { tenantId, tenantDetails } = useSiteContext(); const { taglineText } = tenantDetails; @@ -160,24 +73,125 @@ const Home = () => { }; return ( -
- + ({ + backgroundSize: "cover", + backgroundPosition: "center", + backgroundImage: 'url("/landing-page/map.png")', // replaced the background image style inside useStyles instead of inline styling + minHeight: "max(100.7vh,20em)", + display: "flex", + flexDirection: "column", + justifyContent: "center", + alignItems: "center", + [theme.breakpoints.down("sm")]: { + height: "100%", + }, + })} + > + ({ + maxWidth: "650px", + [theme.breakpoints.down("sm")]: { + padding: 0, + height: "100%", + }, + })} + > - - logo - -
({ + margin: "0 auto", + padding: "3.5rem 0.5rem 3rem 0.5rem", + display: "flex", + flexDirection: "column", + alignItems: "center", + borderRadius: "24px", + boxShadow: "0px 5px 8px 0px rgb(0, 0, 0, 40%)", + [theme.breakpoints.down("sm")]: { + height: "100%", + borderRadius: "0", + paddingTop: "10rem", + justifyContent: "start", + boxShadow: "none", + }, + })} + > + ({ + width: "60%", + height: "auto", + textAlign: "center", + [theme.breakpoints.up("sm")]: { + width: "40%", + }, + })} + > + logo + + ({ + width: "100%", + padding: "5px 15px 15px 15px", + color: "#000000", + [theme.breakpoints.up("sm")]: { + paddingInline: "90px", + }, + })} + > + navigate("/organizations")} + sx={(theme) => ({ + width: "100%", + marginTop: theme.spacing(1), + })} > - + ({ + marginTop: theme.spacing(1), + fontWeight: "500", + fontSize: "18.72px !important", + marginBottom: "0.5em", + textAlign: "center", + })} + > {taglineText} - + - or - + + or + + {isGettingLocation ? ( @@ -206,20 +220,33 @@ const Home = () => {
)} - + ({ + fontSize: "16px", + [theme.breakpoints.up("sm")]: { + fontSize: "19px", + }, + })} > Learn about this site - + - + ); };