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

Removed some outdated code that was causing errors.

parent 8ff4459a
...@@ -54,7 +54,7 @@ class FacilitiesMap extends React.Component { ...@@ -54,7 +54,7 @@ class FacilitiesMap extends React.Component {
}; };
render() { render() {
const {facilities, facility, classes, isMapOpen} = this.props; const {facilities, facility, classes} = this.props;
const {fitBounds, maxBounds, fitBoundsOptions, mapDialogOpen} = this.state; const {fitBounds, maxBounds, fitBoundsOptions, mapDialogOpen} = this.state;
let center, zoom; let center, zoom;
...@@ -67,10 +67,7 @@ class FacilitiesMap extends React.Component { ...@@ -67,10 +67,7 @@ class FacilitiesMap extends React.Component {
} }
return ( return (
<div className={classes.mapContainer} <div className={classes.mapContainer}>
style={{
transform: isMapOpen ? 'translateY(0px)' : 'translateY(436px)'
}}>
<Map <Map
animationOptions={{ animationOptions={{
animate: false animate: false
......
...@@ -10,7 +10,7 @@ import WeekHours from './WeekHours'; ...@@ -10,7 +10,7 @@ import WeekHours from './WeekHours';
import FacilityTags from './FacilityTags'; import FacilityTags from './FacilityTags';
import {removeBrackets} from '../utils/nameUtils'; import {removeBrackets} from '../utils/nameUtils';
const Sidebar = ({facility, isSidebarOpen, isSidebarMapOpen, facilities}) => { const Sidebar = ({facility, isSidebarOpen, facilities}) => {
return ( return (
<div <div
className={classNames(['card-container-offset', (isSidebarOpen && 'card-container-offset-open'), (!isSidebarOpen && 'card-container-offset-closed')])}> className={classNames(['card-container-offset', (isSidebarOpen && 'card-container-offset-open'), (!isSidebarOpen && 'card-container-offset-closed')])}>
...@@ -34,7 +34,7 @@ const Sidebar = ({facility, isSidebarOpen, isSidebarMapOpen, facilities}) => { ...@@ -34,7 +34,7 @@ const Sidebar = ({facility, isSidebarOpen, isSidebarMapOpen, facilities}) => {
</div> </div>
</div> </div>
<div className={'sidebar-row2'}> <div className={'sidebar-row2'}>
<FacilitiesMap isMapOpen={isSidebarMapOpen} facilities={facilities} facility={facility} /> <FacilitiesMap facilities={facilities} facility={facility} />
</div> </div>
</Paper> </Paper>
</div> </div>
......
...@@ -37,7 +37,7 @@ class Layout extends React.Component { ...@@ -37,7 +37,7 @@ class Layout extends React.Component {
}; };
render() { render() {
const {isSidebarOpen, isSidebarMapOpen, selectedFacility, facilities, searchTerm, campusRegion} = this.props; const {isSidebarOpen, selectedFacility, facilities, searchTerm, campusRegion} = this.props;
return ( return (
<div className={'layout-root'}> <div className={'layout-root'}>
...@@ -50,8 +50,7 @@ class Layout extends React.Component { ...@@ -50,8 +50,7 @@ class Layout extends React.Component {
</div> </div>
</div> </div>
<Sidebar facilities={facilities} facility={selectedFacility} isSidebarOpen={isSidebarOpen} <Sidebar facilities={facilities} facility={selectedFacility} isSidebarOpen={isSidebarOpen} />
isSidebarMapOpen={isSidebarMapOpen} />
</div> </div>
</div> </div>
); );
...@@ -66,8 +65,7 @@ function mapStateToProps(state) { ...@@ -66,8 +65,7 @@ function mapStateToProps(state) {
campusRegion: state.ui.search.campusRegion, campusRegion: state.ui.search.campusRegion,
isLoading: state.facilities.isLoading, isLoading: state.facilities.isLoading,
selectedFacility: state.ui.selectedFacility, selectedFacility: state.ui.selectedFacility,
isSidebarOpen: state.ui.sidebar.isOpen, isSidebarOpen: state.ui.sidebar.isOpen
isSidebarMapOpen: state.ui.sidebar.isMapOpen
}; };
} }
......
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