Skip to content
Snippets Groups Projects
Commit 5d1e4358 authored by Audrey Hamelers's avatar Audrey Hamelers
Browse files

WIP: linting

parent 38e7af38
No related branches found
No related tags found
2 merge requests!60Dev,!22Shared data model to dev
......@@ -21,10 +21,9 @@ const Citation = props => {
}
/>
</span>
{articleId &&
articleId.length > 0 && (
<span>, PMID: {articleId.find(id => id.type === 'pmid').id}</span>
)}
{articleId && articleId.length > 0 && (
<span>, PMID: {articleId.find(id => id.type === 'pmid').id}</span>
)}
</Small>
</p>
)
......
......@@ -42,25 +42,24 @@ const FileTable = ({ files }) => (
<th>Filename</th>
<th>Label</th>
</tr>
{files.map(
file =>
file.type === 'manuscript' ? (
<tr key="manuscript">
<td>manuscript</td>
<td>
<FilePreview file={file} />
</td>
<td />
</tr>
) : (
<tr key={file.url}>
<td>{file.type}</td>
<td>
<FilePreview file={file} />
</td>
<td>{file.label}</td>
</tr>
),
{files.map(file =>
file.type === 'manuscript' ? (
<tr key="manuscript">
<td>manuscript</td>
<td>
<FilePreview file={file} />
</td>
<td />
</tr>
) : (
<tr key={file.url}>
<td>{file.type}</td>
<td>
<FilePreview file={file} />
</td>
<td>{file.label}</td>
</tr>
),
)}
</tbody>
</Table>
......
......@@ -288,20 +288,18 @@ class PubMedSearch extends React.Component {
<LoadingIcon />
</Loading>
)}
{results.length < hitcount &&
!loading && (
<LoadMore onClick={this.onLoad} secondary>
Load More Results
</LoadMore>
)}
{results.length < hitcount && !loading && (
<LoadMore onClick={this.onLoad} secondary>
Load More Results
</LoadMore>
)}
</Results>
)}
{results.length === 0 &&
loading && (
<Loading>
<LoadingIcon />
</Loading>
)}
{results.length === 0 && loading && (
<Loading>
<LoadingIcon />
</Loading>
)}
</div>
)}
</SearchArea>
......
......@@ -78,24 +78,23 @@ const UploadFiles = props => {
{files.length > 0 ? (
<div>
<FileList>
{files.map(
file =>
file.type === 'manuscript' ? (
<UploadFileListItem
file={file}
fileData={addManuscript}
key="manuscript"
status={status}
/>
) : (
<UploadFileListItem
checked={checked}
file={file}
fileData={updateFile}
key={file.url}
types={types}
/>
),
{files.map(file =>
file.type === 'manuscript' ? (
<UploadFileListItem
file={file}
fileData={addManuscript}
key="manuscript"
status={status}
/>
) : (
<UploadFileListItem
checked={checked}
file={file}
fileData={updateFile}
key={file.url}
types={types}
/>
),
)}
</FileList>
<DropMore
......
......@@ -405,28 +405,25 @@ class EPMCTagged extends React.Component {
</Content>
</Section>
)}
{pane === 'pdf' &&
pdf && (
<AnnotatePDF
reload={this.listAnnotations()}
toMark={`${currentVersion.id}-pdf`}
url={pdf.url}
user={currentUser.id}
/>
)}
{pane === 'web' &&
html && (
<AnnotateHTML
html={html}
reload={this.listAnnotations()}
toMark={`${currentVersion.id}-web`}
user={currentUser.id}
/>
)}
{pane === 'original' &&
manuscript && (
<ManuscriptPreview file={manuscript} source={source} />
)}
{pane === 'pdf' && pdf && (
<AnnotatePDF
reload={this.listAnnotations()}
toMark={`${currentVersion.id}-pdf`}
url={pdf.url}
user={currentUser.id}
/>
)}
{pane === 'web' && html && (
<AnnotateHTML
html={html}
reload={this.listAnnotations()}
toMark={`${currentVersion.id}-web`}
user={currentUser.id}
/>
)}
{pane === 'original' && manuscript && (
<ManuscriptPreview file={manuscript} source={source} />
)}
</PanelContent>
</PreviewPanel>
<EditPanel style={{ minWidth: showManuscript ? 0 : 'auto' }}>
......
......@@ -93,17 +93,16 @@ class Select extends React.Component {
{label && <Label htmlFor={this.inputId}>{label}</Label>}
<Dropdown>
<DropdownText id={this.inputId} value={value} {...props}>
{options.map(
opt =>
typeof opt === 'object' ? (
<option key={opt.value} value={opt.value}>
{opt.label}
</option>
) : (
<option key={opt} value={opt}>
{opt}
</option>
),
{options.map(opt =>
typeof opt === 'object' ? (
<option key={opt.value} value={opt.value}>
{opt.label}
</option>
) : (
<option key={opt} value={opt}>
{opt}
</option>
),
)}
</DropdownText>
<DropIcon icon={icon} />
......
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