Commit efb48fb4 authored by Mattias J Duffy's avatar Mattias J Duffy

messing around with a lot of stuff

parent 0dc17849
export const TOGGLE_DRAWER = 'TOGGLE_DRAWER';
export const TOGGLE_SIDEBAR = 'TOGGLE_SIDEBAR';
export const SET_FACILITIES = 'SET_FACILITIES';
export const GET_FACILITIES = 'GET_FACILITIES';
export const SET_SIDEBAR = 'SET_SIDEBAR';
......
......@@ -3,12 +3,12 @@ import {
REMOVE_FAVORITE_FACILITY,
SET_SEARCH_TERM,
SET_SIDEBAR,
TOGGLE_DRAWER,
TOGGLE_SIDEBAR,
SET_ALL_FAVORITES
} from './action-types';
export const toggleDrawer = () => ({
type: TOGGLE_DRAWER,
export const toggleSidebar = () => ({
type: TOGGLE_SIDEBAR,
});
export const setSidebar = (facility) => ({
......
......@@ -10,7 +10,7 @@ const CardContainer = ({classes, searchTerm,facilities}) => {
return name.includes(searchTerm.toLowerCase())
}
return (
<Grid container className={classes.root} spacing={24} justify={'center'}>
<Grid container className={classes.root} spacing={24} justify={'center'} align={'flex-end'}>
{facilities.filter(filterCards).map(item =>{
return(<Grid key={item.slug} item>
<FacilityCard facility={item}/>
......@@ -20,13 +20,14 @@ const CardContainer = ({classes, searchTerm,facilities}) => {
)
}
const styleSheet = {
root: {
root:{
// backgroundColor:'red',
margin:0,
width: '100%',
height: '100%',
display: 'flex',
flexWrap: 'wrap',
overflowY:'scroll',
}
},
}
export default withStyles(styleSheet)(CardContainer)
\ No newline at end of file
import React from 'react'
import ReactMapboxGl, { Layer, Feature } from "react-mapbox-gl";
import {withStyles} from 'material-ui/styles';
var bounds = [
[ -77.321649,38.823919], // Southwest coordinates
[ -77.295213,38.835720] // Northeast coordinates
];
let starbucksLogo = new Image();
starbucksLogo.src = require('../images/starbucksSVG.svg')
starbucksLogo.width = 60
starbucksLogo.height = 60
const images = ['starbucks',starbucksLogo,{pixelRatio:3}]
const Map = ReactMapboxGl({
accessToken: "pk.eyJ1IjoibWR1ZmZ5OCIsImEiOiJjaXk2a2lxODQwMDdyMnZzYTdyb3M4ZTloIn0.mSocl7zUnZBO6-CV9cvmnA",
});
const FacilitiesMap = ({classes,facility,facilities}) => {
if(typeof(facility.coordinate_location)==="undefined"){
facility.coordinate_location = {
"type": "Point",
"coordinates": [
-77.30893491622413,
38.83167634001073
]
}
}
console.log(facilities)
return(
<div>
<Map
style="mapbox://styles/mapbox/light-v9"
containerStyle={{
height: "400px",
width: "400px"
}}
maxBounds={bounds}>
<Layer
type="symbol"
id="marker"
layout={{ "icon-image": "starbucks" }}
images={images}>
{(facilities.length > 0) && facilities.map((item) =>{
return(
<Feature key={item.slug} coordinates={item.facility_location.coordinate_location.coordinates}/>
)
})}
<Feature coordinates={[-77.30893491622413,38.83167634001073]}/>
</Layer>
</Map>
</div>
)
}
const styleSheet = {
}
export default withStyles(styleSheet)(FacilitiesMap)
\ No newline at end of file
......@@ -138,6 +138,7 @@ const FacilityStatus = ({classes, facility}) => {
timeInParts[2]);
return (closeTime - curDateTime) / 60000;
// return 6000
};
/**
......
......@@ -5,7 +5,10 @@ import Avatar from 'material-ui/Avatar'
import Typography from 'material-ui/Typography'
import Divider from 'material-ui/Divider';
import TextwTitle from '../components/TextwTitle'
const Sidebar = ({classes,facility}) => {
import FacilitiesMap from '../components/FacilitiesMap'
import classNames from 'classnames'
const Sidebar = ({classes,facility,isSidebarOpen,facilities}) => {
const removeBrackets = (name) => {
if(typeof(name) === "undefined"){
return ""
......@@ -16,7 +19,12 @@ const Sidebar = ({classes,facility}) => {
}
return name
}
return(<Paper className={classes.root}>
// if(isSidebarOpen){
// return (<div></div>)
// }
return(
<Paper className={classNames([classes.root,(!isSidebarOpen && classes.openSidebar),(isSidebarOpen && classes.closedSidebar)])}>
<div className={classes.row1}>
<Avatar className={classes.avatar} src={require('../images/chipotleLogo.png')} />
<div className={classes.title}>
......@@ -34,22 +42,35 @@ const Sidebar = ({classes,facility}) => {
<TextwTitle label="Location" content="The Johnson Center asdfasdfasdfasdf asd fas as asd asdfasdfasf " />
</div>
</div>
<div className={classes.row2}>
<FacilitiesMap facilities={facilities}facility={facility}/>
</div>
</Paper>
)
}
const styleSheet = {
labelRow:{
display:'flex',
},
labelHolder:{
margin:16,
},
root:{
openSidebar:{
flex:'1 0 400px',
},
closedSidebar:{
flex:'1 0 0px',
},
root:{
overflow:'hidden',
display:'block',
boxSizing:'border-box',
margin:16,
position:'relative',
webkitTransition: '150ms ease-in-out',
mozTransition: '150ms ease-in-out',
oTransition: ' 150ms ease-in-out',
transition: '150ms ease-in-out',
},
divider:{
margin:16,
......@@ -69,6 +90,9 @@ const styleSheet = {
display:'flex',
alignItems:'center'
},
row2:{
}
}
export default withStyles(styleSheet)(Sidebar)
......
......@@ -2,13 +2,16 @@ import React from 'react';
import {withStyles } from 'material-ui/styles';
import {compose} from 'redux';
import {connect} from 'react-redux';
import {toggleDrawer,setAllFavorites} from '../actions/ui';
import {toggleSidebar,setAllFavorites} from '../actions/ui';
import AppBar from '../components/AppBar';
import Sidebar from '../components/Sidebar';
import { getFacilities, setFacilities } from '../actions/api';
import Button from 'material-ui/Button';
import CardContainer from '../components/CardContainer';
import SearchBar from './SearchBar';
import Icon from 'material-ui/Icon';
import KeyboardArrowLeft from 'material-ui-icons/KeyboardArrowLeft';
import KeyboardArrowRight from 'material-ui-icons/KeyboardArrowRight';
const suggestions = [
{ label: 'Afghanistan' },
......@@ -59,7 +62,6 @@ class Layout extends React.Component {
}
if(localStorage.getItem('favorites')){
const favorites = JSON.parse(localStorage.getItem('favorites'));
console.log(favorites);
this.props.setAllFavorites(favorites);
}
......@@ -67,19 +69,26 @@ class Layout extends React.Component {
};
render() {
const {classes, isDrawerOpen, toggleDrawer, getFacilities,sidebarFacility} = this.props;
const {classes, isSidebarOpen, toggleSidebar, getFacilities,sidebarFacility} = this.props;
return (
<div className={classes.root}>
<AppBar isOpen={isDrawerOpen} handleMenuClick={ toggleDrawer }/>
<AppBar isOpen={false} handleMenuClick={ ()=>{} }/>
<div className={classes.container}>
<div className={classes.mainContent}>
{/* <Button raised onClick={getFacilities} className={classes.button}>
Default
</Button> */}
<SearchBar suggestions={suggestions}/>
<CardContainer searchTerm={this.props.searchTerm} facilities={this.props.facilities}/>
<SearchBar styles={styleSheet.searchBar} suggestions={suggestions}/>
<CardContainer styles={styleSheet.cardContainer}searchTerm={this.props.searchTerm} facilities={this.props.facilities}/>
</div>
<Sidebar facility={sidebarFacility}/>
<div className={classes.sidebarToggleContainer}>
<button onClick={toggleSidebar} className={classes.openCloseButton}>
{isSidebarOpen &&
<KeyboardArrowLeft className={classes.arrowIcon}/>
}
{!isSidebarOpen &&
<KeyboardArrowRight className={classes.arrowIcon}/>
}
</button>
</div>
<Sidebar facilities={this.props.facilities} facility={sidebarFacility} isSidebarOpen={isSidebarOpen}/>
</div>
</div>
)
......@@ -99,10 +108,35 @@ const styleSheet = {
},
mainContent:{
boxSizing:'border-box',
position:'relative',
flex:'1 1 100%',
height:'100%',
padding:16,
paddingTop:16,
},
sidebarToggleContainer:{
width:16,
position:'relative',
},
openCloseButton:{
width:24,
height:48,
position:'absolute',
top:16,
right:-1,
border:0,
backgroundColor:'white',
boxShadow:'0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)',
outline:'none',
borderRadius:1,
},
arrowIcon:{
position:'absolute',
top:12,
right:0,
width:24,
height:24,
},
}
function mapStateToProps(state) {
......@@ -110,8 +144,9 @@ function mapStateToProps(state) {
facilities: state.facilities.data,
searchTerm:state.ui.search.term,
isLoading: state.facilities.isLoading,
sidebarFacility:state.ui.sidebar,
sidebarFacility:state.ui.sidebar.facility,
isSidebarOpen: state.ui.sidebar.isOpen,
}
}
export default compose(connect(mapStateToProps,{toggleDrawer,getFacilities,setFacilities,setAllFavorites}), withStyles(styleSheet))(Layout);
export default compose(connect(mapStateToProps,{toggleSidebar,getFacilities,setFacilities,setAllFavorites}), withStyles(styleSheet))(Layout);
<?xml version="1.0" encoding="UTF-8"?>
<svg width="36px" height="192px" viewBox="0 0 36 192" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
<title>Incometestblock</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="97.783801%" x2="50%" y2="1.55905295%" id="linearGradient-1">
<stop stop-color="#1991EB" offset="0%"></stop>
<stop stop-color="#2DA1F8" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Home-V2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Context-Window-&amp;-No-Filter" transform="translate(-1196.000000, -421.000000)" fill="url(#linearGradient-1)">
<g id="Context-Window" transform="translate(1030.000000, 70.000000)">
<g id="Opening-Closing-Week" transform="translate(37.000000, 297.215686)">
<g id="Graphs" transform="translate(66.000000, 7.274510)">
<rect id="Income" x="63" y="46.7647059" width="36" height="191.215686" rx="4"></rect>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="498px" height="274px" viewBox="0 0 498 274" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
<title>Opening Closing WeekWKschedule</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="50%" y1="97.783801%" x2="50%" y2="1.55905295%" id="linearGradient-1">
<stop stop-color="#1991EB" offset="0%"></stop>
<stop stop-color="#2DA1F8" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Home-V2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Context-Window-&amp;-No-Filter" transform="translate(-1067.000000, -372.000000)">
<g id="Context-Window" transform="translate(1030.000000, 70.000000)">
<g id="Opening-Closing-Week" transform="translate(37.000000, 297.215686)">
<g id="Lines" transform="translate(41.000000, 8.313725)" fill="#E6EAEE">
<rect id="Graph-Lines" x="0" y="0" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="228.627451" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="249.411765" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="187.058824" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="207.843137" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="145.490196" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="20.7843137" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="41.5686275" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="62.3529412" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="83.1372549" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="103.921569" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="124.705882" width="457" height="1.03921569"></rect>
<rect id="Graph-Lines" x="0" y="166.27451" width="457" height="1.03921569"></rect>
</g>
<g id="Values" font-size="12" font-family="SourceSansPro-Regular, Source Sans Pro" fill="#354052" font-weight="normal">
<text id="12-AM" opacity="0.504256063">
<tspan x="0.396" y="12">12 AM</tspan>
</text>
<text id="4-AM" opacity="0.504256063">
<tspan x="6.36" y="53.5686275">4 AM</tspan>
</text>
<text id="8-AM" opacity="0.504256063">
<tspan x="6.36" y="95.1372549">8 AM </tspan>
</text>
<text id="12-PM" opacity="0.495566121">
<tspan x="0.012" y="136.705882">12 PM</tspan>
</text>
<text id="4-PM" opacity="0.504256063">
<tspan x="5.976" y="178.27451">4 PM</tspan>
</text>
<text id="8-PM" opacity="0.504256063">
<tspan x="5.976" y="219.843137">8 PM</tspan>
</text>
<text id="12-AM" opacity="0.504256063">
<tspan x="0.396" y="261.411765">12 AM</tspan>
</text>
</g>
<g id="Months" transform="translate(72.000000, 265.000000)" font-size="12" font-family="SourceSansPro-Regular, Source Sans Pro" fill="#354052" opacity="0.504256063" font-weight="normal">
<text id="MON">
<tspan x="0.272" y="12">MON</tspan>
</text>
<text id="TUES">
<tspan x="64.252" y="12">TUE</tspan>
</text>
<text id="WED">
<tspan x="124.932" y="12">WED</tspan>
</text>
<text id="THURS">
<tspan x="187.502" y="12">THU</tspan>
</text>
<text id="FRI">
<tspan x="252.472" y="12">FRI</tspan>
</text>
<text id="SAT">
<tspan x="313.056" y="12">SAT</tspan>
</text>
<text id="SUN">
<tspan x="373.544" y="12">SUN</tspan>
</text>
</g>
<g id="Graphs" transform="translate(66.000000, 7.274510)">
<rect id="Income" fill="url(#linearGradient-1)" x="63" y="46.7647059" width="36" height="191.215686" rx="4"></rect>
<rect id="Income" fill="url(#linearGradient-1)" x="1" y="15.5882353" width="36" height="144.45098" rx="4"></rect>
<rect id="Income" fill="url(#linearGradient-1)" x="125" y="36.372549" width="36" height="144.45098" rx="4"></rect>
<rect id="Income" fill="url(#linearGradient-1)" x="187" y="5.19607843" width="36" height="139.254902" rx="4"></rect>
<rect id="Income" fill="url(#linearGradient-1)" x="249" y="25.9803922" width="36" height="134.058824" rx="4"></rect>
<rect id="Income" fill="url(#linearGradient-1)" x="311" y="15.5882353" width="36" height="165.235294" rx="4"></rect>
<rect id="Income" fill="url(#linearGradient-1)" x="374" y="15.5882353" width="36" height="175.627451" rx="4"></rect>
<text id="3-PM" font-family="SourceSansPro-Regular, Source Sans Pro" font-size="12" font-weight="normal" fill="#354052">
<tspan x="7.976" y="172.039216">3 PM</tspan>
</text>
<text id="1:45-PM" font-family="SourceSansPro-Regular, Source Sans Pro" font-size="12" font-weight="normal" fill="#354052">
<tspan x="0.06" y="12">1:45 PM</tspan>
</text>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 237.4 240.3" enable-background="new 0 0 237.4 240.3" xml:space="preserve">
<g>
<path fill="#FFFFFF" d="M237.4,118.7c0,65.6-53.2,118.7-118.7,118.7C53.1,237.4,0,184.2,0,118.7C0,53.1,53.2,0,118.7,0
C184.2,0,237.4,53.1,237.4,118.7"/>
<path fill="#00643C" d="M130.6,51.3c-1-0.2-6-1-11.9-1s-10.9,0.8-11.9,1c-0.6,0.1-0.8-0.5-0.4-0.8c0.4-0.3,12.3-9.4,12.3-9.4
s11.9,9.1,12.3,9.4C131.4,50.8,131.2,51.4,130.6,51.3 M110,110.1c0,0-0.6,0.2-0.8,0.8c2.5,1.9,4.2,6.3,9.4,6.3s6.9-4.4,9.4-6.3
c-0.2-0.6-0.8-0.8-0.8-0.8s-3.3,0.8-8.6,0.8C113.3,110.9,110,110.1,110,110.1 M118.6,102.8c-1.4,0-1.8-0.5-2.7-0.5
s-2.8,0.8-3.2,1.4c0,0.3,0.2,0.6,0.4,0.9c2.1,0.3,3.1,1.5,5.5,1.5s3.4-1.2,5.5-1.5c0.3-0.3,0.4-0.6,0.4-0.9
c-0.4-0.7-2.2-1.4-3.2-1.4C120.4,102.2,120.1,102.8,118.6,102.8 M237.2,125.2c-0.2,2.8-0.4,5.7-0.7,8.4c-13.4,2.2-18.2-9.7-32-9.2
c0.8,2.9,1.5,5.9,2,8.9c11.4,0,15.9,10.6,28.6,9c-0.7,3.2-1.5,6.4-2.4,9.6c-10,1-13.5-8.9-25.1-8.7c0.1,1.7,0.1,3.3,0.1,5
c0,0.9,0,1.9-0.1,2.8c9.9-0.1,13.1,9,22.5,8.6c-1.2,3.2-2.5,6.3-3.9,9.4c-6.8-0.4-9.1-9-19.3-8.3c-0.3,2.2-0.7,4.4-1.2,6.6
c8.9-0.6,10.8,7.6,17.2,8.2c-1.6,3-3.4,5.9-5.2,8.7c-3.8-2-7.1-8.1-14.2-8.5c0.7-2.3,1.4-4.6,1.9-6.9c-6.4,0-13.6-2.5-19.7-8
c2-11.3-15.5-22.7-15.5-31c0-8.9,4.5-13.9,4.5-26c0-9-4.4-18.7-10.9-25.3c-1.3-1.3-2.6-2.3-4.1-3.3c6,7.5,10.7,16.3,10.7,26.6
c0,11.4-5.3,17.4-5.3,27.9s15.4,19.6,15.4,30.4c0,4.3-1.4,8.4-5.8,16.6c6.9,6.9,15.9,10.6,21.7,10.6c1.9,0,2.9-0.6,3.6-2
c0.6-1.3,1.1-2.6,1.6-3.9c6.2,0.2,9.1,5.9,12.5,8.2c-1.9,2.5-3.9,5-6,7.4c-2.3-2.6-5.4-6.9-10-8.1c-0.8,1.6-1.7,3.1-2.6,4.7
c3.9,1.1,6.6,5,8.7,7.6c-2.2,2.3-4.6,4.5-7,6.7c-1.5-2.3-3.9-5.3-6.5-7c-1,1.3-2,2.6-3,3.9c2.3,1.5,4.2,4.3,5.5,6.5
c-2.8,2.3-5.7,4.4-8.7,6.4c-1.5-12.1-17.9-20.3-13.5-34.3c-1.5,2.5-3.2,5.6-3.2,9.3c0,10.1,10.8,18.2,11.6,28.2
c-2.2,1.3-4.5,2.6-6.9,3.8c-0.4-11.1-11.8-23.2-11.8-32.2c0-10.1,13.3-20.3,13.3-32.3s-15.3-20.3-15.3-30.8s6.5-16.5,6.5-30
c0-9.9-4.7-19.8-11.9-26.2c-1.3-1.1-2.5-2-4.1-2.8C156,78.6,160,86,160,97.3c0,12.7-7.5,19.7-7.5,32.1s15,19.3,15,30.8
s-14,21.3-14,33.2c0,10.8,12.3,21.6,12.5,34.4c-2.7,1.2-5.4,2.3-8.2,3.2c1.6-12.9-12.3-26.3-12.3-36.9c0-11.5,14.5-21.5,14.5-33.9
s-14.7-18.2-14.7-31s9.1-19.9,9.1-34c0-11-5.4-20.9-13.4-27c-0.2-0.1-0.3-0.3-0.5-0.4c-0.7-0.6-1.4,0.1-0.8,0.8
c5.6,7,8.6,14.1,8.6,24.6c0,12.9-10.4,23.4-10.4,35.9c0,14.8,14,19,14,31.1s-15,21.8-15,34.7c0,11.9,14.2,25.2,11.7,38.9
c-2.8,0.7-5.7,1.4-8.6,1.9c2.7-17.1-11.2-29.5-11.2-40.7c0-12.1,15.5-23,15.5-34.8c0-11.2-11.1-14.8-12.6-26.3
c-0.2-1.6-1.5-2.7-3.2-2.4c-2.3,0.4-5.2,1.9-9.7,1.9c-4.6,0-7.4-1.5-9.7-1.9c-1.7-0.3-3,0.9-3.2,2.4c-1.5,11.5-12.6,15.1-12.6,26.3
c0,11.9,15.5,22.7,15.5,34.8c0,11.2-13.9,23.5-11.2,40.7c-2.9-0.5-5.8-1.2-8.6-1.9c-2.4-13.8,11.7-27,11.7-38.9
c0-12.9-15-22.6-15-34.7c0-12.1,14-16.3,14-31.1c0-12.5-10.4-23-10.4-35.9c0-10.5,3-17.6,8.6-24.6c0.5-0.7-0.1-1.3-0.8-0.8
c-0.2,0.1-0.3,0.3-0.5,0.4c-7.9,6.1-13.4,16-13.4,27c0,14.1,9.1,21.2,9.1,34c0,12.8-14.7,18.6-14.7,31s14.5,22.4,14.5,33.9
c0,10.6-13.9,23.9-12.3,36.9c-2.8-1-5.5-2-8.2-3.2c0.2-12.8,12.5-23.6,12.5-34.4c0-11.9-14-21.6-14-33.2c0-11.6,15-18.4,15-30.8
c0-12.4-7.5-19.4-7.5-32.1c0-11.3,4-18.7,10.8-26.9c-1.5,0.8-2.8,1.7-4.1,2.8c-7.2,6.4-11.9,16.4-11.9,26.2c0,13.5,6.5,19.5,6.5,30
s-15.3,18.8-15.3,30.8s13.3,22.1,13.3,32.3c0,9.1-11.4,21.2-11.8,32.2c-2.3-1.2-4.6-2.4-6.9-3.8c0.9-10.1,11.7-18.1,11.7-28.2
c0-3.7-1.7-6.8-3.2-9.3c4.4,14-12,22.3-13.5,34.3c-3-2-5.9-4.1-8.7-6.4c1.3-2.2,3.3-5,5.5-6.5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,13.9,13.3,21.6c0.4,0.9,1.2,1.2,2.1,0.7c11.9-5.9,25.3-9.3,39.6-9.3c14.2,0,27.6,3.3,39.6,9.3
c0.9,0.5,1.7,0.2,2.1-0.7C163.7,60.2,168.4,53,173.6,46.3 M192.6,98.8c17.1-5.9,28.3,11,41.5,7.1c-12.8-13.6-23.2-29-21.8-46.8
c0.1-1-0.9-1.6-1.7-1c-6.5,4.5-11.1,12-12.5,20.4c-9-5.8-19.6-6.6-28.4-3.1C178.7,81.7,186.4,89.7,192.6,98.8"/>
<polygon fill="#00643C" points="190.4,240.3 188.6,240.3 188.6,228.9 184.4,228.9 184.4,227.3 194.7,227.3 194.7,228.9
190.4,228.9 "/>
<polygon fill="#00643C" points="203.2,237.3 203.3,237.3 207.2,227.3 210,227.3 210,240.3 208.2,240.3 208.2,229.4 208.1,229.4
203.8,240.3 202.6,240.3 198.2,229.4 198.2,229.4 198.2,240.3 196.4,240.3 196.4,227.3 199.3,227.3 "/>
</g>
</svg>
import {
TOGGLE_DRAWER, SET_SIDEBAR, SET_SEARCH_TERM, SET_FILTERED_LIST,
TOGGLE_SIDEBAR, SET_SIDEBAR, SET_SEARCH_TERM, SET_FILTERED_LIST,
ADD_FAVORITE_FACILITY, REMOVE_FAVORITE_FACILITY,SET_ALL_FAVORITES
} from '../actions/action-types'
function isOpen(state=false,action){
switch (action.type) {
case TOGGLE_DRAWER:
return !state;
default:
return state;
}
const sidebarDefault = {
facility:{},
isOpen:false,
}
const drawer = (state={},action) => ({
isOpen:isOpen(state.isOpen,action)
});
const sidebar = (state={},action) => {
const sidebar = (state=sidebarDefault,action) => {
switch(action.type){
case SET_SIDEBAR:
return action.facility;
return Object.assign({},state,{},{
facility:action.facility
});
case TOGGLE_SIDEBAR:
return Object.assign({},state,{
isOpen:!state.isOpen
});
default:
return {};
return state;
}
};
......@@ -65,7 +63,6 @@ const favorites = (state = [], action) => {
const ui = (state={},action) =>({
drawer:drawer(state.drawer,action),
sidebar:sidebar(state.sidebar,action),
search: search(state.search,state.facilities,action),
favorites: favorites(state.favorites, action),
......
This diff is collapsed.
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