Skip to content

Commit

Permalink
change conditional rendering for visibility hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavomm19 committed Oct 8, 2024
1 parent 6416523 commit 15df5b0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/js_modules/syllabus/Topbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ function TopBar({ currentAsset, ...rest }) {
<SubtasksPill />
</>
)}
{isVisible && (
<Button display="flex" alignItems="center" gap="5px" variant="ghost" color={hexColor.blueDefault} onClick={scrollTop}>
<Icon icon="arrowLeft2" style={{ transform: 'rotate(90deg)' }} color={hexColor.blueDefault} />
{t('back-to-top')}
</Button>
)}
<Button visibility={!isVisible && 'hidden'} display="flex" alignItems="center" gap="5px" variant="ghost" color={hexColor.blueDefault} onClick={scrollTop}>
<Icon icon="arrowLeft2" style={{ transform: 'rotate(90deg)' }} color={hexColor.blueDefault} />
{t('back-to-top')}
</Button>
</Box>
</Box>
</>
Expand Down

0 comments on commit 15df5b0

Please sign in to comment.