updated nav bar to accept custom site description

This commit is contained in:
bill bittner 2018-03-15 17:55:30 -07:00
parent 9db9471a1e
commit 1ac1863b7a
6 changed files with 10 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,13 +1,14 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { updateLoggedInChannel } from 'actions/channel'; import { updateLoggedInChannel } from 'actions/channel';
import {updateSelectedChannel} from 'actions/publish';
import View from './view'; import View from './view';
import {updateSelectedChannel} from '../../actions/publish';
const mapStateToProps = ({ channel }) => { const mapStateToProps = ({ channel, site }) => {
return { return {
channelName : channel.loggedInChannel.name, channelName : channel.loggedInChannel.name,
channelShortId: channel.loggedInChannel.shortId, channelShortId: channel.loggedInChannel.shortId,
channelLongId : channel.loggedInChannel.longId, channelLongId : channel.loggedInChannel.longId,
siteDescription: site.description,
}; };
}; };

View file

@ -53,12 +53,13 @@ class NavBar extends React.Component {
} }
} }
render () { render () {
const { siteDescription } = this.props;
return ( return (
<div className='row row--wide nav-bar'> <div className='row row--wide nav-bar'>
<div className='row row--padded row--short flex-container--row flex-container--space-between-center'> <div className='row row--padded row--short flex-container--row flex-container--space-between-center'>
<Logo /> <Logo />
<div className='nav-bar--center'> <div className='nav-bar--center'>
<span className='nav-bar-tagline'>Open-source, decentralized image and video sharing.</span> <span className='nav-bar-tagline'>{siteDescription}</span>
</div> </div>
<div className='nav-bar--right'> <div className='nav-bar--right'>
<NavLink className='nav-bar-link link--nav' activeClassName='link--nav-active' to='/' exact>Publish</NavLink> <NavLink className='nav-bar-link link--nav' activeClassName='link--nav-active' to='/' exact>Publish</NavLink>