Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/ChooseResourceType/ChooseResourceType.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const ChooseResourceType = props => {
return (
<>
{!isMobile ? (
<DesktopChooseResourceType resourceTypeInfo={props.resourceTypeInfo} />
<DesktopChooseResourceType resourceTypeInfo={props.resourceTypeInfo} clearAllTags={props.clearAllTags} />
) : (
<MobileChooseResourceType resourceTypeInfo={props.resourceTypeInfo} />
<MobileChooseResourceType resourceTypeInfo={props.resourceTypeInfo} clearAllTags={props.clearAllTags} />
)}
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useRef } from 'react';
import { useDispatch, useSelector } from 'react-redux';

import {
resetFilterFunction,
setResourceType,
setToolbarModal,
TOOLBAR_MODAL_NONE,
Expand All @@ -31,7 +30,7 @@ const DesktopResourceButton = props => {
borderRadius: '8px'
}}
onClick={() => {
dispatch(resetFilterFunction());
props.clearAllTags();
dispatch(setResourceType(props.type));
}}
data-cy={props['data-cy']}
Expand Down Expand Up @@ -89,6 +88,7 @@ function DesktopChooseResourceType(props) {
key={entry.type}
{...entry}
data-cy={`button-${entry.type}-data-selector`}
clearAllTags={props.clearAllTags}
/>
))}
</Box>
Expand Down
9 changes: 4 additions & 5 deletions src/components/ChooseResourceType/MobileChooseResourceType.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import Box from '@mui/material/Box';
import Dialog from '@mui/material/Dialog';
import List from '@mui/material/List';
import Slide from '@mui/material/Slide';
import Grid from '@mui/material/Grid';
import List from '@mui/material/List';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import Slide from '@mui/material/Slide';
import Typography from '@mui/material/Typography';
import { useDispatch, useSelector } from 'react-redux';

import {
resetFilterFunction,
setResourceType,
setToolbarModal,
TOOLBAR_MODAL_NONE,
Expand Down Expand Up @@ -38,7 +37,7 @@ const MobileResourceButton = props => {
<ListItemButton
sx={{ alignItems: 'end' }}
onClick={() => {
dispatch(resetFilterFunction());
props.clearAllTags();
switchType(props.type);
}}
>
Expand Down Expand Up @@ -88,7 +87,7 @@ const MobileChooseResourceType = props => {
>
<List sx={{ maxWidth: 210 }}>
{props.resourceTypeInfo.map(entry => (
<MobileResourceButton key={entry.type} {...entry} />
<MobileResourceButton key={entry.type} {...entry} clearAllTags={props.clearAllTags} />
))}
</List>
</Slide>
Expand Down
4 changes: 1 addition & 3 deletions src/components/ReactGoogleMaps/ReactGoogleMaps.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Fade } from '@mui/material';
import Stack from '@mui/material/Stack';
import { CITY_HALL_COORDINATES } from 'constants/defaults';
import { GoogleApiWrapper, Map, Marker } from 'google-maps-react';
import useIsMobile from 'hooks/useIsMobile';
import { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import ReactTouchEvents from 'react-touch-events';
import {
TOOLBAR_MODAL_SEARCH,
getResources,
removeEntryFilterFunction,
removeFilterFunction,
Expand Down Expand Up @@ -424,7 +422,7 @@ export const ReactGoogleMaps = ({ google }) => {
search={location => searchForLocation(location)}
/>
</Stack>
<ChooseResourceType resourceTypeInfo={resourceTypeInfo} />
<ChooseResourceType resourceTypeInfo={resourceTypeInfo} clearAllTags={clearAllTags} />
<Filter
resourceType={resourceType}
filters={filters}
Expand Down
Loading