import React, { Component } from 'react' import { Link, withRouter } from 'react-router-dom' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import { Loader, Keyframes, Video } from '../common' // import { Coco } from '../metadata' import * as searchActions from './search.actions' import * as metadataActions from '../metadata/metadata.actions' import SearchMeta from './search.meta' class Browse extends Component { componentDidMount() { this.browse() } componentDidUpdate(prevProps) { if (prevProps.match.params !== this.props.match.params) { this.browse() } } browse() { const { hash } = this.props.match.params if (hash) { this.props.searchActions.browse(hash) } if (hash) { this.props.metadataActions.fetchMetadata(hash) } } render() { const { browse, options } = this.props console.log('browse', browse) if (!browse || browse.reset || browse.loading) { return