Commit a155d655 authored by Vignesh Devendran's avatar Vignesh Devendran 🎯
Browse files

feat(ui): minor linting fixes

parent c1ca4603
Pipeline #26865 failed with stage
......@@ -3,29 +3,41 @@ import PropTypes from 'prop-types'
import { Dropdown } from '@pubsweet/ui'
import { htmlToJats } from '../../../../../server/utils/jatsUtils'
let html = ""
let html = ''
// added console to test options - to be removed later
const options = [
{ id: 1, onClick: () => {
// eslint-disable-next-line
console.log("HTML Selected")
}, title: 'HTML',},
{ id: 2, onClick: () => {
// eslint-disable-next-line
console.log("PDF Selected")
}, title: 'PDF', },
{ id: 3, onClick: () => {
/* eslint-disable */
console.log("XML Selected")
console.log("HTML:", html)
console.log("JATS:", htmlToJats(html))
/* eslint-disable */
}, title: 'XML', },
{
id: 1,
onClick: () => {
// eslint-disable-next-line
console.log('HTML Selected')
},
title: 'HTML',
},
{
id: 2,
onClick: () => {
// eslint-disable-next-line
console.log('PDF Selected')
},
title: 'PDF',
},
{
id: 3,
onClick: () => {
/* eslint-disable */
console.log('XML Selected')
console.log('HTML:', html)
console.log('JATS:', htmlToJats(html))
/* eslint-disable */
},
title: 'XML',
},
]
/* eslint-disable import/prefer-default-export */
export const DownloadDropdown = ({source}) => {
export const DownloadDropdown = ({ source }) => {
html = source
return (
<Dropdown itemsList={options} primary>
......
......@@ -3,14 +3,13 @@ import { withRouter } from 'react-router-dom'
import styled from 'styled-components'
import ProductionWaxEditor from '../../../wax-collab/src/ProductionWaxEditor'
import { DownloadDropdown } from './DownloadDropdown'
import {
import {
Container,
Heading,
HeadingWithAction,
Heading,
HeadingWithAction,
SectionContent,
Spinner,
} from '../../../shared'
const Info = styled.span`
align-items: center;
......@@ -29,26 +28,26 @@ const Production = ({
// fileUpload,
updateManuscript,
}) => (
<Container>
<HeadingWithAction>
<Heading>Production</Heading>
<DownloadDropdown source={manuscript.meta.source} />
</HeadingWithAction>
{file &&
file.mimeType ===
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ? (
<SectionContent>
{manuscript ? (
<ProductionWaxEditor
onBlur={source => {
updateManuscript(manuscript.id, { meta: { source } })
}}
user={currentUser}
value={manuscript.meta.source}
/>
) : (
<Spinner />
)}
<Container>
<HeadingWithAction>
<Heading>Production</Heading>
<DownloadDropdown source={manuscript.meta.source} />
</HeadingWithAction>
{file &&
file.mimeType ===
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ? (
<SectionContent>
{manuscript ? (
<ProductionWaxEditor
onBlur={source => {
updateManuscript(manuscript.id, { meta: { source } })
}}
user={currentUser}
value={manuscript.meta.source}
/>
) : (
<Spinner />
)}
</SectionContent>
) : (
<SectionContent>
......
......@@ -33,7 +33,6 @@ export const Menu = styled.div`
user-select: none;
z-index: 5;
& > div {
height: 36px;
}
......
Markdown is supported
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