Created
October 18, 2016 15:54
-
-
Save solebox/fdacf5b04a733cf6b3ae4eb825c16e19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Title from "./Slider/Title"; | |
import { fetchThumbs } from "../actions/thumbActions"; | |
import { connect } from "react-redux"; | |
import Thumbnail from "./Slider/Thumbnail"; | |
@connect((store) => { | |
return { | |
user: store.user, | |
thumbs: store.thumbs | |
} | |
}) | |
export default class Slider extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
componentDidMount() { | |
this.props.dispatch(fetchThumbs()); | |
} | |
render() { | |
const { thumbs_list } = this.props.thumbs; | |
// const mapped_thumbs = thumbs_list.map((athumb) => | |
// <Thumbnail map_id={athumb.map_id} map_url={athumb.map_url} map_title={athumb.map_title} /> | |
// ); | |
return ( | |
<div id="slider" class="mdl-layout__drawer"> | |
<header> | |
<span class="mdl-layout-title"> | |
<a href="/"> | |
<img id="mainLogo" src="../static/img/mapabazman-logo-v1.png"></img> | |
</a> | |
</span> | |
<button class="mdl-button mdl-button--icon mdl-js-button mdl-js-ripple-effect layer-button-info" data-dialog="dialog"> | |
<i class="material-icons">info</i> | |
</button> | |
<div class="mdl-grid"> | |
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | |
<input id="fixed-search" class="mdl-textfield__input" name="searchInput" type="text"></input> | |
<label class="mdl-textfield__label" for="fixed-search">Type Something...</label> | |
</div> | |
<div id="search" class="mdl-cell mdl-cell--4-col mdl-cell--12-col-tablet"> | |
<a id="search-more" href="#">More options</a> | |
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">Search</button> | |
</div> | |
</div> | |
</header> | |
<div id="search"> | |
<ul id="thumb" > | |
{ mapped_thumbs } | |
</ul> | |
</div> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment