diff --git a/packages/component-faraday-ui/src/Tag.js b/packages/component-faraday-ui/src/Tag.js index e2d279938b7451c3ca20d9d959a13f0fea9ffffe..ea8dca87d8a52769f908420007ebf0e448339c8c 100644 --- a/packages/component-faraday-ui/src/Tag.js +++ b/packages/component-faraday-ui/src/Tag.js @@ -12,7 +12,7 @@ export default styled.div` font-family: ${th('fontHeading')}; font-size: ${th('tag.fontSize')}; font-weight: ${th('tag.fontWeight')}; - padding: calc(${th('gridUnit')} / 4) calc(${th('gridUnit')} / 2); + padding: 0 calc(${th('gridUnit')} / 2); text-align: center; vertical-align: baseline; width: fit-content; diff --git a/packages/components-faraday/src/components/Dashboard/DashboardItems.js b/packages/components-faraday/src/components/Dashboard/DashboardItems.js index a978c0b0e709c3ecbb9911695473f029a5a48515..d6d5e398a592453773dd802bbe459864dd2e5753 100644 --- a/packages/components-faraday/src/components/Dashboard/DashboardItems.js +++ b/packages/components-faraday/src/components/Dashboard/DashboardItems.js @@ -4,7 +4,7 @@ import { get, has } from 'lodash' import styled from 'styled-components' import { withRouter } from 'react-router-dom' import { ManuscriptCard, Row } from 'pubsweet-component-faraday-ui' -import { compose, setDisplayName, withHandlers, withProps } from 'recompose' +import { compose, setDisplayName, withHandlers } from 'recompose' import withVersion from './withVersion' @@ -30,17 +30,12 @@ const DashboardItems = ({ onClick, list, deleteProject, listView = true }) => ( export default compose( withRouter, - withProps(({ collection = {}, fragment = {} }) => ({ - hasDetails: get(collection, 'status', 'draft') !== 'draft', - isNotSubmitted: - get(collection, 'status', 'draft') === 'draft' || - !has(fragment, 'submitted'), - })), withHandlers({ - onClick: ({ history, hasDetails, isNotSubmitted }) => ( - collection, - fragment, - ) => { + onClick: ({ history }) => (collection, fragment) => { + const hasDetails = get(collection, 'status', 'draft') !== 'draft' + const isNotSubmitted = + get(collection, 'status', 'draft') === 'draft' && + !has(fragment, 'submitted') if (isNotSubmitted) { history.push( `/projects/${collection.id}/versions/${fragment.id}/submit`,