Skip to content
Snippets Groups Projects
Commit 25c79e49 authored by Jure's avatar Jure
Browse files

fix: adapt review layout to use SectionContent

parent a76fcd86
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ import { JournalContext } from '../../../../xpub-journal/src' ...@@ -7,7 +7,6 @@ import { JournalContext } from '../../../../xpub-journal/src'
import { reviewWithComment } from './util' import { reviewWithComment } from './util'
import { import {
AdminSection, AdminSection,
Container,
Title, Title,
SectionHeader, SectionHeader,
SectionRowGrid, SectionRowGrid,
...@@ -15,47 +14,8 @@ import { ...@@ -15,47 +14,8 @@ import {
SectionAction, SectionAction,
RecommendationInputContainer, RecommendationInputContainer,
} from '../style' } from '../style'
import { FilesUpload } from '../../../../shared'
// const AttachmentsInput = ({ import { SectionContent, FilesUpload } from '../../../../shared'
// field,
// form: { values },
// updateReview,
// uploadFile,
// type,
// }) => (
// <>
// <UploadButton
// buttonText="↑ Upload files"
// onChange={event => {
// const val = event.target.files[0]
// const file = cloneDeep(val)
// file.filename = val.name
// file.type = type
// const { updateIndex, comment } = createComments(
// values,
// { files: [file] },
// type,
// )
// const data = cloneDeep(values)
// set(data, `comments.${updateIndex}`, comment)
// updateReview(data).then(({ data: { updateReview } }) => {
// uploadFile(val, updateReview, type)
// })
// }}
// />
// <Flexbox>
// {getCommentFiles(values, type).map(val => {
// const file = cloneDeep(val)
// file.name = file.filename
// return <UploadingFile file={file} key={file.name} uploaded />
// })}
// </Flexbox>
// </>
// )
const NoteInput = ({ const NoteInput = ({
field, field,
...@@ -200,7 +160,7 @@ const ReviewForm = ({ ...@@ -200,7 +160,7 @@ const ReviewForm = ({
uploadFile, uploadFile,
review, review,
}) => ( }) => (
<Container> <SectionContent>
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit}>
<AdminSection> <AdminSection>
<SectionHeader> <SectionHeader>
...@@ -230,7 +190,7 @@ const ReviewForm = ({ ...@@ -230,7 +190,7 @@ const ReviewForm = ({
</SectionRowGrid> </SectionRowGrid>
</AdminSection> </AdminSection>
</form> </form>
</Container> </SectionContent>
) )
export default ReviewForm export default ReviewForm
...@@ -7,7 +7,7 @@ import ReviewForm from './ReviewForm' ...@@ -7,7 +7,7 @@ import ReviewForm from './ReviewForm'
import ReviewMetadata from '../metadata/ReviewMetadata' import ReviewMetadata from '../metadata/ReviewMetadata'
import Review from './Review' import Review from './Review'
import EditorSection from '../decision/EditorSection' import EditorSection from '../decision/EditorSection'
import { Columns, Manuscript, Chat } from '../style' import { Columns, Manuscript, Chat } from '../../../../shared'
import MessageContainer from '../../../../component-chat/src' import MessageContainer from '../../../../component-chat/src'
const addEditor = (manuscript, label) => ({ const addEditor = (manuscript, label) => ({
......
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