diff --git a/app/components/AdminPage.js b/app/components/AdminPage.js index 42d0f72877185b1ad3d77ded7f914edceb21d62f..04fffaed8378a7b9d39ce3a2f86223346fa975e8 100644 --- a/app/components/AdminPage.js +++ b/app/components/AdminPage.js @@ -69,7 +69,7 @@ const PrivateRoute = ({ component: Component, ...rest }) => ( ) PrivateRoute.propTypes = { - component: PropTypes.node.isRequired, + component: PropTypes.func.isRequired, } const updateStuff = data => { diff --git a/app/components/component-frontpage/src/Frontpage.js b/app/components/component-frontpage/src/Frontpage.js index 5ad8a04035fe6ef80739342816e62490717afcae..a8f56f3847aea4576d09da9808b81a34d06cd1ec 100644 --- a/app/components/component-frontpage/src/Frontpage.js +++ b/app/components/component-frontpage/src/Frontpage.js @@ -76,18 +76,18 @@ const Frontpage = ({ history, ...props }) => { </SectionHeader> <SectionRow key={`manuscript-${manuscript.id}`}> {manuscript.submission?.abstract ? ( - <p>Abstract: {manuscript.submission?.abstract}</p> + <h1>Abstract: {manuscript.submission?.abstract}</h1> ) : ( <br /> )} {manuscript.visualAbstract ? ( - <p> - Visual abstract:{' '} + <div> + <h1>Visual abstract</h1> <VisualAbstract alt="Visual abstract" src={manuscript.visualAbstract} /> - </p> + </div> ) : ( <br /> )} @@ -98,25 +98,25 @@ const Frontpage = ({ history, ...props }) => { file => skipXSweet(file) && file.fileType !== 'visualAbstract' && ( - <p> - <a - href={file.url} - rel="noopener noreferrer" - target="_blank" - > - {file.filename} - </a> - </p> + <a + href={file.url} + key={`manuscript-${manuscript.id}`} + rel="noopener noreferrer" + target="_blank" + > + {file.filename} + </a> ), )} {manuscript.files.map( file => !skipXSweet(file) && ( - <p> - <Accordion label="View Manuscript Text"> - <Wax content={manuscript.meta.source} readonly /> - </Accordion> - </p> + <Accordion + key={`manuscript-${manuscript.id}`} + label="View Manuscript Text" + > + <Wax content={manuscript.meta.source} readonly /> + </Accordion> ), )} </div> @@ -126,17 +126,16 @@ const Frontpage = ({ history, ...props }) => { {manuscript.submission?.links ? ( <div> - Submitted research objects: + <h1>Submitted research objects</h1> {manuscript.submission?.links?.map(link => ( - <p key={`manuscript-${manuscript.id}`}> - <a - href={link.url} - rel="noopener noreferrer" - target="_blank" - > - {link.url} - </a> - </p> + <a + href={link.url} + key={`manuscript-${manuscript.id}`} + rel="noopener noreferrer" + target="_blank" + > + {link.url} + </a> ))} </div> ) : ( @@ -153,7 +152,7 @@ const Frontpage = ({ history, ...props }) => { } Frontpage.propTypes = { - history: PropTypes.node.isRequired, + history: PropTypes.oneOfType([PropTypes.object]).isRequired, } export default Frontpage diff --git a/app/components/xpub-journal/src/index.js b/app/components/xpub-journal/src/index.js index 9840e76678fb8c3d014bb0295e934d56a471291f..7fef7c1234d5b2eb4c45816ca04741f0cb6b0172 100644 --- a/app/components/xpub-journal/src/index.js +++ b/app/components/xpub-journal/src/index.js @@ -8,8 +8,8 @@ const JournalProvider = ({ journal, children }) => ( ) JournalProvider.propTypes = { - journal: PropTypes.node.isRequired, - children: PropTypes.node.isRequired, + journal: PropTypes.oneOfType([PropTypes.object]).isRequired, + children: PropTypes.oneOfType([PropTypes.object]).isRequired, } export { JournalContext, JournalProvider }