Skip to content

Commit

Permalink
fix: research drafts (#3714)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariojsnunes committed Jun 29, 2024
1 parent 5495122 commit 8f6492a
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions src/pages/Research/Content/ResearchList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,28 @@ const ResearchList = observer(() => {
{!showDrafts ? <ResearchFilterHeader /> : <div></div>}

<Flex sx={{ gap: 2 }} mb={[3, 3, 0]}>
<AuthWrapper roleRequired={RESEARCH_EDITOR_ROLES}>
<DraftButton
showDrafts={showDrafts}
draftCount={draftCount}
handleShowDrafts={handleShowDrafts}
/>
</AuthWrapper>
{isPreciousPlastic() ? (
<Link to={userStore.activeUser ? '/research/create' : '/sign-up'}>
<Button variant="primary" data-cy="create">
{listing.create}
</Button>
</Link>
<>
{userStore.activeUser && (
<DraftButton
showDrafts={showDrafts}
draftCount={draftCount}
handleShowDrafts={handleShowDrafts}
/>
)}
<Link to={userStore.activeUser ? '/research/create' : '/sign-up'}>
<Button variant="primary" data-cy="create">
{listing.create}
</Button>
</Link>
</>
) : (
<AuthWrapper roleRequired={RESEARCH_EDITOR_ROLES}>
<DraftButton
showDrafts={showDrafts}
draftCount={draftCount}
handleShowDrafts={handleShowDrafts}
/>
<Link to="/research/create">
<Button variant="primary" data-cy="create">
{listing.create}
Expand Down

0 comments on commit 8f6492a

Please sign in to comment.