diff --git a/src/components/Img/index.js b/src/components/Img/index.js index 6e76d72..fb6d645 100644 --- a/src/components/Img/index.js +++ b/src/components/Img/index.js @@ -1,14 +1,4 @@ -import React from 'react' import glamorous from 'glamorous' -import RaisedButton from 'material-ui/RaisedButton' - -const radiusMap = { - topLeft: 'borderTopLeftRadius', - topRight: 'borderTopRightRadius', - bottomRight: 'borderBottomRightRadius', - bottomLeft: 'borderBottomLeftRadius', - all: 'borderRadius' -} const Img = glamorous.div({ backgroundRepeat: 'no-repeat', diff --git a/src/containers/Preferences/Content.js b/src/containers/Preferences/Content.js index ed71775..e233220 100644 --- a/src/containers/Preferences/Content.js +++ b/src/containers/Preferences/Content.js @@ -31,8 +31,8 @@ const rightIconMenu = func => ( ) -const Content = ({ showQuotes, quotes, backgrounds, onDelete }) => ( - showQuotes ? ( +const Content = ({ show, quotes, backgrounds, onDelete }) => ( + show === 'quotes' ? ( @@ -80,7 +80,7 @@ const Content = ({ showQuotes, quotes, backgrounds, onDelete }) => ( ) Content.propTypes = { - showQuotes: PropTypes.bool.isRequired, + show: PropTypes.string.isRequired, backgrounds: PropTypes.array.isRequired, onDelete: PropTypes.func.isRequired, quotes: PropTypes.array.isRequired diff --git a/src/containers/Preferences/Header.js b/src/containers/Preferences/Header.js index 574fb8f..6d64d59 100644 --- a/src/containers/Preferences/Header.js +++ b/src/containers/Preferences/Header.js @@ -3,32 +3,68 @@ import { FormattedMessage } from 'react-intl' import PropTypes from 'prop-types' import { GridList } from 'material-ui/GridList' import ContentAdd from 'material-ui/svg-icons/content/add' +import Avatar from 'material-ui/Avatar' import Button from 'components/Button' -import { GridItem, Title } from './HeaderStyles' +import { Add as AddQuote } from 'containers/Quote/Add' +import { Add as AddBackground } from 'containers/Background/Add' +import { Account, GridItem, Title, User, Info, Action } from './HeaderStyles' import messages from './messages' -const Header = ({ showQuotes }) => { - const currentlyShowing = - - return ( +const Header = ({ show, user, onLogout, onOpenDialog, openDialog, onAdd }) => ( + show === 'general' ? ( + + + + + +

{user.displayName}

+

{user.email}

+
+
+
+ + + + + +
+ ) : ( - {currentlyShowing} + <FormattedMessage{...messages[`randomQuotes.containers.preferences.${show}`]} />