Skip to content

Commit

Permalink
fix: make sure to not show actions until document has been confirmed …
Browse files Browse the repository at this point in the history
…if it has confirmation
  • Loading branch information
thoreyjona committed Oct 17, 2024
1 parent 35f2690 commit bb1227c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@ export const DocumentDetailScreen: NavigationFunctionComponent<{
const hasConfirmation = !!Document.confirmation
const hasAlert =
!!Document.alert && (Document.alert?.title || Document.alert?.data)
const showAlert =
const showAdditionalInfo =
showConfirmedAlert ||
(hasAlert && !hasConfirmation) ||
(hasActions && !showConfirmedAlert)
(hasActions && !showConfirmedAlert && !hasConfirmation)

const loading = docRes.loading || !accessToken
const fileTypeLoaded = !!Document?.content?.type
Expand Down Expand Up @@ -438,7 +438,7 @@ export const DocumentDetailScreen: NavigationFunctionComponent<{
label={isUrgent ? intl.formatMessage({ id: 'inbox.urgent' }) : ''}
/>
</Host>
{showAlert && (
{showAdditionalInfo && (
<ActionsWrapper>
{showConfirmedAlert && (
<Alert
Expand Down

0 comments on commit bb1227c

Please sign in to comment.