@@ -16,6 +16,7 @@ import { useEffect, useState } from "react";
16
16
import { Link as RouterLink , useNavigate } from "react-router-dom" ;
17
17
import * as analytics from "services/analytics" ;
18
18
import { useSiteContext } from "../../contexts/siteContext" ;
19
+ import SEO from "../SEO" ;
19
20
20
21
const logoPaths = {
21
22
1 : require ( "images/foodoasis.svg" ) . default ,
@@ -80,178 +81,187 @@ const Home = () => {
80
81
} , [ ] ) ;
81
82
82
83
return (
83
- < Box
84
- style = { { backgroundImage : bgImg } }
85
- sx = { ( theme ) => ( {
86
- backgroundSize : "cover" ,
87
- backgroundPosition : "center" ,
88
- backgroundImage : 'url("/landing-page/map.png")' ,
89
- minHeight : "max(100.7vh,20em)" ,
90
- display : "flex" ,
91
- flexDirection : "column" ,
92
- justifyContent : "center" ,
93
- alignItems : "center" ,
94
- [ theme . breakpoints . down ( "sm" ) ] : {
95
- height : "100%" ,
96
- } ,
97
- } ) }
98
- >
99
- < Container
100
- component = "main"
101
- maxWidth = { false }
84
+ < >
85
+ < SEO
86
+ title = "Home | Food Oasis"
87
+ description = "Food Oasis helps you find free food resources in Los Angeles. Learn more about our mission and services."
88
+ url = "https://www.foodoasis.la"
89
+ />
90
+ < Box
91
+ style = { { backgroundImage : bgImg } }
102
92
sx = { ( theme ) => ( {
103
- maxWidth : "650px" ,
93
+ backgroundSize : "cover" ,
94
+ backgroundPosition : "center" ,
95
+ backgroundImage : 'url("/landing-page/map.png")' ,
96
+ minHeight : "max(100.7vh,20em)" ,
97
+ display : "flex" ,
98
+ flexDirection : "column" ,
99
+ justifyContent : "center" ,
100
+ alignItems : "center" ,
104
101
[ theme . breakpoints . down ( "sm" ) ] : {
105
- padding : 0 ,
106
102
height : "100%" ,
107
103
} ,
108
104
} ) }
109
105
>
110
- < Paper
106
+ < Container
107
+ component = "main"
108
+ maxWidth = { false }
111
109
sx = { ( theme ) => ( {
112
- margin : "0 auto" ,
113
- padding : "3.5rem 0.5rem 3rem 0.5rem" ,
114
- display : "flex" ,
115
- flexDirection : "column" ,
116
- alignItems : "center" ,
117
- borderRadius : "24px" ,
118
- boxShadow : "0px 5px 8px 0px rgb(0, 0, 0, 40%)" ,
110
+ maxWidth : "650px" ,
119
111
[ theme . breakpoints . down ( "sm" ) ] : {
112
+ padding : 0 ,
120
113
height : "100%" ,
121
- borderRadius : "0" ,
122
- paddingTop : "10rem" ,
123
- justifyContent : "start" ,
124
- boxShadow : "none" ,
125
114
} ,
126
115
} ) }
127
116
>
128
- < Box
117
+ < Paper
129
118
sx = { ( theme ) => ( {
130
- width : "60%" ,
131
- height : "auto" ,
132
- textAlign : "center" ,
133
- [ theme . breakpoints . up ( "sm" ) ] : {
134
- width : "40%" ,
135
- } ,
136
- } ) }
137
- >
138
- < img src = { logoPaths [ tenantId ] } alt = "logo" />
139
- </ Box >
140
- < Box
141
- sx = { ( theme ) => ( {
142
- width : "100%" ,
143
- padding : "5px 15px 15px 15px" ,
144
- color : "#000000" ,
145
- [ theme . breakpoints . up ( "sm" ) ] : {
146
- paddingInline : "90px" ,
119
+ margin : "0 auto" ,
120
+ padding : "3.5rem 0.5rem 3rem 0.5rem" ,
121
+ display : "flex" ,
122
+ flexDirection : "column" ,
123
+ alignItems : "center" ,
124
+ borderRadius : "24px" ,
125
+ boxShadow : "0px 5px 8px 0px rgb(0, 0, 0, 40%)" ,
126
+ [ theme . breakpoints . down ( "sm" ) ] : {
127
+ height : "100%" ,
128
+ borderRadius : "0" ,
129
+ paddingTop : "10rem" ,
130
+ justifyContent : "start" ,
131
+ boxShadow : "none" ,
147
132
} ,
148
133
} ) }
149
134
>
150
135
< Box
151
- component = "form"
152
- onSubmit = { ( ) => navigate ( "/organizations" ) }
136
+ sx = { ( theme ) => ( {
137
+ width : "60%" ,
138
+ height : "auto" ,
139
+ textAlign : "center" ,
140
+ [ theme . breakpoints . up ( "sm" ) ] : {
141
+ width : "40%" ,
142
+ } ,
143
+ } ) }
144
+ >
145
+ < img src = { logoPaths [ tenantId ] } alt = "logo" />
146
+ </ Box >
147
+ < Box
153
148
sx = { ( theme ) => ( {
154
149
width : "100%" ,
155
- marginTop : theme . spacing ( 1 ) ,
150
+ padding : "5px 15px 15px 15px" ,
151
+ color : "#000000" ,
152
+ [ theme . breakpoints . up ( "sm" ) ] : {
153
+ paddingInline : "90px" ,
154
+ } ,
156
155
} ) }
157
156
>
158
- < Typography
159
- variant = "h2"
157
+ < Box
158
+ component = "form"
159
+ onSubmit = { ( ) => navigate ( "/organizations" ) }
160
160
sx = { ( theme ) => ( {
161
+ width : "100%" ,
161
162
marginTop : theme . spacing ( 1 ) ,
162
- fontWeight : "500" ,
163
- fontSize : "18.72px !important" ,
164
- marginBottom : "0.5em" ,
165
- textAlign : "center" ,
166
163
} ) }
167
164
>
168
- { taglineText }
169
- </ Typography >
170
- < Box
171
- sx = { {
172
- display : "flex" ,
173
- alignItems : "flex-start" ,
174
- justifyContent : "center" ,
175
- marginBottom : "1em" ,
176
- fontSize : "16px" ,
177
- } }
178
- >
179
- < AddressDropDown autoFocus = { true } />
180
- </ Box >
181
- < Box
182
- sx = { {
183
- display : "flex" ,
184
- alignItems : "flex-start" ,
185
- justifyContent : "center" ,
186
- marginBottom : "1em" ,
187
- fontSize : "16px" ,
188
- } }
189
- >
190
- or
191
- </ Box >
192
- < Box
193
- sx = { {
194
- display : "flex" ,
195
- alignItems : "flex-start" ,
196
- justifyContent : "center" ,
197
- marginBottom : "1em" ,
198
- fontSize : "16px" ,
199
- } }
200
- >
201
- { isGettingLocation ? (
202
- < Stack justifyContent = "center" alignContent = "center" >
203
- < CircularProgress />
204
- </ Stack >
205
- ) : (
206
- < div style = { { textAlign : "center" } } >
207
- < Tooltip
208
- enterTouchDelay = { 0 }
209
- title = {
210
- ( locationPermission === "denied" || ! ! error ) &&
211
- "Please allow location access"
212
- }
213
- >
214
- < div >
215
- < Button
216
- variant = "contained"
217
- startIcon = { < LocationOn /> }
218
- onClick = { useMyLocationTrigger }
219
- disabled = { locationPermission === "denied" || ! ! error }
220
- >
221
- Use my current location
222
- </ Button >
223
- </ div >
224
- </ Tooltip >
225
- </ div >
226
- ) }
227
- </ Box >
228
- < Box
229
- sx = { {
230
- display : "flex" ,
231
- alignItems : "flex-start" ,
232
- justifyContent : "center" ,
233
- marginBottom : "1em" ,
234
- fontSize : "16px" ,
235
- } }
236
- >
237
- < Link
238
- component = { RouterLink }
239
- to = "/about"
165
+ < Typography
166
+ variant = "h2"
240
167
sx = { ( theme ) => ( {
241
- fontSize : "16px" ,
242
- [ theme . breakpoints . up ( "sm" ) ] : {
243
- fontSize : "19px" ,
244
- } ,
168
+ marginTop : theme . spacing ( 1 ) ,
169
+ fontWeight : "500" ,
170
+ fontSize : "18.72px !important" ,
171
+ marginBottom : "0.5em" ,
172
+ textAlign : "center" ,
245
173
} ) }
246
174
>
247
- Learn about this site
248
- </ Link >
175
+ { taglineText }
176
+ </ Typography >
177
+ < Box
178
+ sx = { {
179
+ display : "flex" ,
180
+ alignItems : "flex-start" ,
181
+ justifyContent : "center" ,
182
+ marginBottom : "1em" ,
183
+ fontSize : "16px" ,
184
+ } }
185
+ >
186
+ < AddressDropDown autoFocus = { true } />
187
+ </ Box >
188
+ < Box
189
+ sx = { {
190
+ display : "flex" ,
191
+ alignItems : "flex-start" ,
192
+ justifyContent : "center" ,
193
+ marginBottom : "1em" ,
194
+ fontSize : "16px" ,
195
+ } }
196
+ >
197
+ or
198
+ </ Box >
199
+ < Box
200
+ sx = { {
201
+ display : "flex" ,
202
+ alignItems : "flex-start" ,
203
+ justifyContent : "center" ,
204
+ marginBottom : "1em" ,
205
+ fontSize : "16px" ,
206
+ } }
207
+ >
208
+ { isGettingLocation ? (
209
+ < Stack justifyContent = "center" alignContent = "center" >
210
+ < CircularProgress />
211
+ </ Stack >
212
+ ) : (
213
+ < div style = { { textAlign : "center" } } >
214
+ < Tooltip
215
+ enterTouchDelay = { 0 }
216
+ title = {
217
+ ( locationPermission === "denied" || ! ! error ) &&
218
+ "Please allow location access"
219
+ }
220
+ >
221
+ < div >
222
+ < Button
223
+ variant = "contained"
224
+ startIcon = { < LocationOn /> }
225
+ onClick = { useMyLocationTrigger }
226
+ disabled = {
227
+ locationPermission === "denied" || ! ! error
228
+ }
229
+ >
230
+ Use my current location
231
+ </ Button >
232
+ </ div >
233
+ </ Tooltip >
234
+ </ div >
235
+ ) }
236
+ </ Box >
237
+ < Box
238
+ sx = { {
239
+ display : "flex" ,
240
+ alignItems : "flex-start" ,
241
+ justifyContent : "center" ,
242
+ marginBottom : "1em" ,
243
+ fontSize : "16px" ,
244
+ } }
245
+ >
246
+ < Link
247
+ component = { RouterLink }
248
+ to = "/about"
249
+ sx = { ( theme ) => ( {
250
+ fontSize : "16px" ,
251
+ [ theme . breakpoints . up ( "sm" ) ] : {
252
+ fontSize : "19px" ,
253
+ } ,
254
+ } ) }
255
+ >
256
+ Learn about this site
257
+ </ Link >
258
+ </ Box >
249
259
</ Box >
250
260
</ Box >
251
- </ Box >
252
- </ Paper >
253
- </ Container >
254
- </ Box >
261
+ </ Paper >
262
+ </ Container >
263
+ </ Box >
264
+ </ >
255
265
) ;
256
266
} ;
257
267
0 commit comments