Skip to content

Commit 1688e4f

Browse files
committed
Merge branch 'release-1.0.92'
2 parents 7f8539a + fffbd70 commit 1688e4f

File tree

17 files changed

+410
-295
lines changed

17 files changed

+410
-295
lines changed

client/package-lock.json

Lines changed: 340 additions & 237 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "foodoasis-client",
33
"description": "React Client for Food Oasis",
4-
"version": "1.0.91",
4+
"version": "1.0.92",
55
"author": "Hack for LA",
66
"license": "GPL-2.0",
77
"private": true,
@@ -68,7 +68,7 @@
6868
"@types/react": "^18.2.38",
6969
"@types/react-dom": "^18.3.1",
7070
"@types/react-gtm-module": "^2.0.4",
71-
"@vitejs/plugin-react": "^4.3.3",
71+
"@vitejs/plugin-react": "^4.3.4",
7272
"babel-jest": "^29.7.0",
7373
"babel-preset-vite": "^1.1.3",
7474
"jest": "^29.7.0",
@@ -77,7 +77,7 @@
7777
"prettier": "^2.4.1",
7878
"ts-jest": "^29.2.5",
7979
"typescript": "^5.0.0",
80-
"vite": "^5.4.9",
80+
"vite": "^6.2.0",
8181
"vite-plugin-svgr": "^4.2.0",
8282
"vite-tsconfig-paths": "^5.0.1"
8383
},

client/src/components/Admin/OrganizationEdit/ContactDetails.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default function ContactDetails({
2020
id="website"
2121
label="Website"
2222
tooltipTitle="Enter the Full URL for the organization's web site, e.g., https://www.hackforla.org"
23+
href={values.website}
2324
/>
2425
<TextField
2526
id="website"

client/src/components/FoodSeeker/SearchResults/AdvancedFilters/AdvancedFilterButton.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ const CustomButton = styled(Button, {
3636
? theme.palette.filterButtons.backgroundColor
3737
: theme.palette.common.white,
3838
"&:hover": {
39-
backgroundColor: theme.palette.filterButtons.backgroundColor,
39+
backgroundColor: isSelected
40+
? theme.palette.filterButtons.hoverSelectedColor
41+
: theme.palette.filterButtons.hoverColor,
4042
},
4143
},
4244
}));

client/src/components/FoodSeeker/SearchResults/ResultsMap/ResultsMap.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const ResultsMap = ({ stakeholders, categoryIds, toggleCategory, loading }) => {
4545
const selectedOrganization = useSelectedOrganization();
4646
const navigate = useNavigate();
4747
const location = useLocation();
48-
const { isMobile, isTablet } = useBreakpoints();
48+
const { isMobile } = useBreakpoints();
4949
const isListPanelOpen = useListPanel();
5050
const isFilterPanelOpen = useFilterPanel();
5151
const { mapRef, flyTo } = useMapbox();
@@ -147,7 +147,7 @@ const ResultsMap = ({ stakeholders, categoryIds, toggleCategory, loading }) => {
147147
const handleZoomIn = () => {
148148
const longOffset = 0.0399 * Math.pow(2, 11 - zoom);
149149
const newCenter = {
150-
lng: !isTablet && isListPanelOpen ? currentCenter.lng + longOffset : currentCenter.lng,
150+
lng: isListPanelOpen ? currentCenter.lng + longOffset : currentCenter.lng,
151151
lat: selectedOrganization ? selectedOrganization.latitude : currentCenter.lat
152152
};
153153

client/src/components/FoodSeeker/SearchResults/SearchResults.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import {
1515
import Filters from "./ResultsFilters/ResultsFilters";
1616
import List from "./ResultsList/ResultsList";
1717
import Map from "./ResultsMap/ResultsMap";
18-
import { Desktop, Mobile, Tablet } from "./layouts";
18+
import { Desktop, Mobile } from "./layouts";
1919
import SEO from "../../SEO";
2020

2121
const SearchResults = () => {
2222
const isListPanelVisible = useIsListPanelVisible();
23-
const { isDesktop, isTablet } = useBreakpoints();
23+
const { isDesktop } = useBreakpoints();
2424
const { selectAll, loading } = useOrganizationBests();
2525
const { categoryIds, toggleCategory } = useCategoryIds([]);
2626
const { getGeoJSONById } = useNeighborhoodsGeoJSON();
@@ -167,8 +167,6 @@ const SearchResults = () => {
167167
/>
168168
{isDesktop ? (
169169
<Desktop filters={filters} map={map} list={list} />
170-
) : isTablet ? (
171-
<Tablet filters={filters} map={map} list={list} />
172170
) : (
173171
<Mobile showList={showList} filters={filters} map={map} list={list} />
174172
)}

client/src/components/FoodSeeker/SearchResults/StakeholderDetails/StakeholderDetails.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,14 @@ const StakeholderDetails = ({ onBackClick, isDesktop }) => {
333333
direction="column"
334334
justifyContent="flex-start"
335335
alignItems="center"
336+
gap={2}
336337
sx={{ marginTop: ".2rem", marginRight: "1rem" }}
337338
>
338339
<StakeholderIcon stakeholder={selectedOrganization} />
340+
<Typography variant="body2" align="center">
341+
{Boolean(selectedOrganization?.distance) &&
342+
`${selectedOrganization.distance?.toFixed(1)} mi`}
343+
</Typography>
339344
</Stack>
340345
</Grid2>
341346
<Grid2 xs={10}>
@@ -766,7 +771,7 @@ function normalizeSocialLink({ value, socialMedia }) {
766771
value === "N/A" ||
767772
value === "n/a" ||
768773
value === "n / a" ||
769-
value === "N / A" ||
774+
value === "N / A" ||
770775
!value
771776
) {
772777
return null;

client/src/components/FoodSeeker/SearchResults/StakeholderPreview/StakeholderPreview.jsx

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import {
33
Button,
44
Chip,
55
Divider,
6+
Link,
67
Stack,
7-
Typography
8+
Typography,
89
} from "@mui/material";
910
import Grid2 from "@mui/material/Unstable_Grid2";
1011
import {
@@ -47,7 +48,7 @@ import {
4748
useSearchCoordinates,
4849
useUserCoordinates,
4950
} from "../../../../appReducer";
50-
import { success } from "../../../../theme/palette";
51+
import { linkText, success } from "../../../../theme/palette";
5152

5253
const isLastOccurrenceInMonth = (tenantTimeZone) => {
5354
const currentDate = new Date();
@@ -184,9 +185,14 @@ const StakeholderPreview = ({ stakeholder, onSelect, isDesktop }) => {
184185
direction="column"
185186
justifyContent="flex-start"
186187
alignItems="center"
188+
gap={2}
187189
sx={{ marginTop: ".2rem", marginRight: "1rem", height: "100%" }}
188190
>
189191
<StakeholderIcon stakeholder={stakeholder} />
192+
<Typography variant="body2" align="center">
193+
{Boolean(stakeholder?.distance) &&
194+
`${stakeholder.distance?.toFixed(1)} mi`}
195+
</Typography>
190196
</Stack>
191197
</Grid2>
192198

@@ -198,12 +204,13 @@ const StakeholderPreview = ({ stakeholder, onSelect, isDesktop }) => {
198204
component="h2"
199205
align="left"
200206
fontWeight="bold"
201-
sx={{
202-
textDecoration: "underline",
203-
}}
204-
onClick={() => handleSelectOrganization(stakeholder)}
205207
>
206-
{stakeholder.name}
208+
<Link
209+
sx={{ color: "inherit" }}
210+
onClick={() => handleSelectOrganization(stakeholder)}
211+
>
212+
{stakeholder.name}
213+
</Link>
207214
</Typography>
208215
<Stack
209216
direction="row"
@@ -345,7 +352,7 @@ const StakeholderPreview = ({ stakeholder, onSelect, isDesktop }) => {
345352
</Typography>
346353

347354
<Typography
348-
color="#4A80F5"
355+
color={linkText}
349356
align="right"
350357
sx={{
351358
"&:hover": { textDecoration: "underline" },
@@ -463,7 +470,18 @@ const StakeholderPreview = ({ stakeholder, onSelect, isDesktop }) => {
463470
""
464471
)}
465472
</Stack>
466-
473+
<Stack alignItems="flex-end">
474+
<Link
475+
onClick={() => handleSelectOrganization(stakeholder)}
476+
sx={{
477+
color: linkText,
478+
cursor: "pointer",
479+
border: "none",
480+
}}
481+
>
482+
more info...
483+
</Link>
484+
</Stack>
467485
<Stack
468486
direction="row"
469487
justifyContent="start"

client/src/components/FoodSeeker/SearchResults/layouts/Tablet.jsx

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export { default as Mobile } from "./Mobile";
2-
export { default as Tablet } from "./Tablet";
32
export { default as Desktop } from "./Desktop";

0 commit comments

Comments
 (0)