Skip to content
Snippets Groups Projects
Commit 14053ba3 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

refactor: remove unused files

parent f6dd7e5a
No related branches found
No related tags found
1 merge request!43Sprint #19
import React from 'react'
import { isEmpty } from 'lodash'
import styled from 'styled-components'
import { th } from '@pubsweet/ui-toolkit'
import { Authors, Files } from './'
import { Expandable } from '../molecules/'
const ManuscriptDetails = ({
startExpanded,
fragment: {
files = {},
authors = [],
conflicts = {},
metadata: { abstract = '' },
},
}) => (
<Root>
<Expandable label="Details" startExpanded={startExpanded}>
{!!abstract && (
<Expandable label="ABSTRACT" startExpanded>
<Text dangerouslySetInnerHTML={{ __html: abstract }} />
</Expandable>
)}
{conflicts.hasConflicts === 'yes' && (
<Expandable label="CONFLICT OF INTEREST">
<Text dangerouslySetInnerHTML={{ __html: conflicts.message }} />
</Expandable>
)}
{!!authors.length && (
<Expandable label="AUTHORS">
<Authors authors={authors} />
</Expandable>
)}
{!isEmpty(files) && (
<Expandable label="FILES">
<Files files={files} />
</Expandable>
)}
</Expandable>
</Root>
)
export default ManuscriptDetails
// #region styled-components
const Text = styled.span`
color: ${th('colorPrimary')};
font-family: ${th('fontReading')};
font-size: ${th('fontSizeBaseSmall')};
`
const Root = styled.div`
background-color: ${th('colorBackground')};
margin-top: calc(${th('subGridUnit')} * 2);
transition: height 0.3s;
`
// #endregion
...@@ -16,7 +16,6 @@ import { ...@@ -16,7 +16,6 @@ import {
SideBarActions, SideBarActions,
SubmitRevision, SubmitRevision,
ReviewsAndReports, ReviewsAndReports,
ManuscriptDetails,
ManuscriptVersion, ManuscriptVersion,
EditorialComments, EditorialComments,
ResponseToReviewers, ResponseToReviewers,
...@@ -49,10 +48,6 @@ const ManuscriptLayout = ({ ...@@ -49,10 +48,6 @@ const ManuscriptLayout = ({
<ManuscriptVersion project={project} version={version} /> <ManuscriptVersion project={project} version={version} />
</RightDetails> </RightDetails>
</Header> </Header>
<ManuscriptDetails
fragment={version}
startExpanded={isEmpty(version.revision)}
/>
{editorialRecommendations.length > 0 && ( {editorialRecommendations.length > 0 && (
<EditorialComments <EditorialComments
editorInChief={editorInChief} editorInChief={editorInChief}
......
...@@ -6,7 +6,6 @@ export { default as SubmitRevision } from './SubmitRevision' ...@@ -6,7 +6,6 @@ export { default as SubmitRevision } from './SubmitRevision'
export { default as EditorialComment } from './EditorialComment' export { default as EditorialComment } from './EditorialComment'
export { default as ReviewReportCard } from './ReviewReportCard' export { default as ReviewReportCard } from './ReviewReportCard'
export { default as ManuscriptLayout } from './ManuscriptLayout' export { default as ManuscriptLayout } from './ManuscriptLayout'
export { default as ManuscriptDetails } from './ManuscriptDetails'
export { default as ManuscriptVersion } from './ManuscriptVersion' export { default as ManuscriptVersion } from './ManuscriptVersion'
export { default as ReviewsAndReports } from './ReviewsAndReports' export { default as ReviewsAndReports } from './ReviewsAndReports'
export { default as EditorialComments } from './EditorialComments' export { default as EditorialComments } from './EditorialComments'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment