diff --git a/ui/src/components/Publication/SidebarCard/Actions/index.tsx b/ui/src/components/Publication/SidebarCard/Actions/index.tsx index 13b996cee..9d835202c 100644 --- a/ui/src/components/Publication/SidebarCard/Actions/index.tsx +++ b/ui/src/components/Publication/SidebarCard/Actions/index.tsx @@ -144,112 +144,117 @@ const Actions: React.FC = (props): React.ReactElement => { - - - {/** Download options */} {props.publication.currentStatus === 'LIVE' && ( -
- - Download: - - - -
- )} - {user && user.email ? ( <> - {/* if the publication is a peer review, no options shall be given to write a linked publication */} - {props.publication.type !== 'PEER_REVIEW' && ( - <> - {Helpers.linkedPublicationTypes[ - props.publication.type as keyof typeof Helpers.linkedPublicationTypes - ].map((item: any) => { - return ( - { - router.push({ - pathname: `${Config.urls.createPublication.path}`, - query: { - for: props.publication.id, - type: item - } - }); - }} - /> + + {/** Download options */} +
+ + Download: + + + +
+ {user && user.email ? ( + <> + {/* if the publication is a peer review, no options shall be given to write a linked publication */} + {props.publication.type !== 'PEER_REVIEW' && ( <> - { - router.push({ - pathname: `${Config.urls.createPublication.path}`, - query: { - for: props.publication.id, - type: 'PEER_REVIEW' - } - }); - }} - /> - setShowRedFlagModel(true)} - /> + {Helpers.linkedPublicationTypes[ + props.publication.type as keyof typeof Helpers.linkedPublicationTypes + ].map((item: any) => { + return ( + { + router.push({ + pathname: `${Config.urls.createPublication.path}`, + query: { + for: props.publication.id, + type: item + } + }); + }} + /> + ); + })} + {props.publication.user.id !== user.id && ( + <> + { + router.push({ + pathname: `${Config.urls.createPublication.path}`, + query: { + for: props.publication.id, + type: 'PEER_REVIEW' + } + }); + }} + /> + setShowRedFlagModel(true)} + /> + + )} )} + ) : user && !user.email ? ( + <> + + Verify your email for more actions + + + ) : ( + <> + + + Sign in for more actions + + )} - ) : user && !user.email ? ( - <> - - Verify your email for more actions - - - ) : ( - <> - - - Sign in for more actions - - )} ); diff --git a/ui/src/components/Publication/SidebarCard/Sections/index.tsx b/ui/src/components/Publication/SidebarCard/Sections/index.tsx index faaba3f49..4e81d70ab 100644 --- a/ui/src/components/Publication/SidebarCard/Sections/index.tsx +++ b/ui/src/components/Publication/SidebarCard/Sections/index.tsx @@ -8,7 +8,7 @@ type Props = { const Sections: React.FC = (props): React.ReactElement => ( <> - + {!!props.sectionList && (
{props.sectionList.map((section) => ( diff --git a/ui/src/components/index.tsx b/ui/src/components/index.tsx index 7a0a975f5..63f06e32e 100644 --- a/ui/src/components/index.tsx +++ b/ui/src/components/index.tsx @@ -72,7 +72,7 @@ export { default as ScrollToTop } from './ScrollToTop'; export { default as Search } from './SearchToggle'; export { default as SearchDesktop } from './SearchToggle/Desktop'; export { default as SearchMobile } from './SearchToggle/Mobile'; -export { default as SectioBreak } from './SectionBreak'; +export { default as SectionBreak } from './SectionBreak'; export { default as SurveyWidget } from './SurveyWidget'; export { default as Tabs } from './Tabs'; export { default as TextEditor } from './TextEditor';