From e735c26f3e779c04f646a0f941fd1c83ffb49030 Mon Sep 17 00:00:00 2001 From: Andy Nicholson <intothemist@gmail.com> Date: Fri, 22 Jan 2021 18:07:07 +1100 Subject: [PATCH] feat(*): add in Accordion view on published manuscript front page --- app/components/component-frontpage/src/Frontpage.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/components/component-frontpage/src/Frontpage.js b/app/components/component-frontpage/src/Frontpage.js index 9be6945a84..73b6c778a2 100644 --- a/app/components/component-frontpage/src/Frontpage.js +++ b/app/components/component-frontpage/src/Frontpage.js @@ -1,9 +1,11 @@ +import Accordion from '@pubsweet/ui/src/molecules/Accordion' import React, { useContext, useState } from 'react' import PropTypes from 'prop-types' import { useQuery } from '@apollo/client' import { JournalContext } from '../../xpub-journal/src' import queries from './queries' import { Container, Placeholder, VisualAbstract } from './style' +import Wax from '../../wax-collab/src/Editoria' import { Spinner, @@ -16,8 +18,6 @@ import { Pagination, } from '../../shared' -import { UserAction as Action } from '../../component-manuscripts/src/style' - const Frontpage = ({ history, ...props }) => { const [sortName] = useState('created') const [sortDirection] = useState('DESC') @@ -113,11 +113,9 @@ const Frontpage = ({ history, ...props }) => { file => !skipXSweet(file) && ( <p> - <Action - to={`/journal/versions/${manuscript.id}/manuscript`} - > - View Manuscript Text - </Action> + <Accordion label="View Manuscript Text"> + <Wax content={manuscript.meta.source} readonly /> + </Accordion> </p> ), )} -- GitLab