Commit ee9d5f76 authored by Andrew Hrdy's avatar Andrew Hrdy
Browse files

Fixed the error with grid align. Small fixes.

parent f0ed0665
Pipeline #1779 passed with stage
in 1 minute and 40 seconds
...@@ -9,7 +9,7 @@ const CardContainer = ({searchTerm, facilities}) => { ...@@ -9,7 +9,7 @@ const CardContainer = ({searchTerm, facilities}) => {
return name.includes(searchTerm.toLowerCase()) return name.includes(searchTerm.toLowerCase())
} }
return ( return (
<Grid container className={'card-container-root'} spacing={24} justify={'center'} align={'flex-end'}> <Grid container className={'card-container-root'} spacing={24} justify={'center'} alignItems={'flex-end'}>
{facilities.filter(filterCards).map(item =>{ {facilities.filter(filterCards).map(item =>{
return( return(
<Grid key={item.slug} item> <Grid key={item.slug} item>
......
...@@ -53,7 +53,8 @@ class FacilityCard extends React.Component { ...@@ -53,7 +53,8 @@ class FacilityCard extends React.Component {
} }
handleCardClick = () => { handleCardClick = () => {
this.props.setSelectedFacility(this.props.facility); const isSelected = this.props.selectedFacility.slug === this.props.facility.slug;
this.props.setSelectedFacility(isSelected ? null : this.props.facility);
}; };
toggleMap = () => { toggleMap = () => {
...@@ -158,7 +159,7 @@ class FacilityCard extends React.Component { ...@@ -158,7 +159,7 @@ class FacilityCard extends React.Component {
addFavoriteFacility={addFavoriteFacility} isHovered={this.state.isHovered} removeFavoriteFacility={removeFavoriteFacility}/> addFavoriteFacility={addFavoriteFacility} isHovered={this.state.isHovered} removeFavoriteFacility={removeFavoriteFacility}/>
<CardContent className={'fc-card-content'}> <CardContent className={'fc-card-content'}>
<Grid container align={'center'} direction={'column'} className={'fc-small-grid-container-spacing'}> <Grid container alignItems={'center'} direction={'column'} className={'fc-small-grid-container-spacing'}>
<Grid item className={classnames('fc-small-grid-item-spacing', 'fc-ellipsis-container')}> <Grid item className={classnames('fc-small-grid-item-spacing', 'fc-ellipsis-container')}>
<Typography type={'subheading'} align={'center'} className={classnames('fc-title', 'fc-one-line-ellipsis')}> <Typography type={'subheading'} align={'center'} className={classnames('fc-title', 'fc-one-line-ellipsis')}>
{removeBrackets(facility.facility_name)} {removeBrackets(facility.facility_name)}
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
height: 100%; height: 100%;
display: flex; display: flex;
overflow-x: hidden; overflow-x: hidden;
overflow-y:scroll; overflow-y: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment