Skip to content

Commit

Permalink
fix: Documents link in flagship app Android
Browse files Browse the repository at this point in the history
target='_blank' is breaking the interceptNavigation in Android. We
should investigate why.
  • Loading branch information
zatteo committed Nov 28, 2024
1 parent 1d2f5c2 commit bc6279f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/AppLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Outlet, useLocation, useNavigate } from 'react-router-dom'

import { BarCenter, BarComponent } from 'cozy-bar'
import { useClient } from 'cozy-client'
import { isFlagshipApp } from 'cozy-device-helper'
import Icon from 'cozy-ui/transpiled/react/Icon'
import CalendarIcon from 'cozy-ui/transpiled/react/Icons/Calendar'
import CheckboxIcon from 'cozy-ui/transpiled/react/Icons/Checkbox'
Expand Down Expand Up @@ -109,7 +110,10 @@ const AppLayout = () => {
</NavLink>
</NavItem>
<NavItem>
<NavLink href={currentAccountFolderLink} target="_blank">
<NavLink
href={currentAccountFolderLink}
target={isFlagshipApp() ? '_self' : '_blank'}
>
<NavIcon icon={FolderIcon} />
<NavText>{t('Sidebar.documents')}</NavText>
{!isMobile && (
Expand Down

0 comments on commit bc6279f

Please sign in to comment.