Skip to content

Commit

Permalink
chore: nx format:write update dirty files
Browse files Browse the repository at this point in the history
  • Loading branch information
andes-it committed Oct 8, 2024
1 parent 937c10e commit 09f8e28
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { AuthCustomDelegation } from '@island.is/api/schema'
import { Box, Stack } from '@island.is/island-ui/core'
import { AccessCard, DelegationViewModal } from '@island.is/portals/shared-modules/delegations'
import {
AccessCard,
DelegationViewModal,
} from '@island.is/portals/shared-modules/delegations'
import { useDeleteCustomDelegationAdminMutation } from '../screens/DelegationAdminDetails/DelegationAdmin.generated'
import { useRevalidator } from 'react-router-dom'
import React, { useState } from 'react'
Expand Down Expand Up @@ -43,7 +46,11 @@ const DelegationList = ({ delegationsList, direction }: DelegationProps) => {
delegation={delegation}
isAdminView
variant={direction}
onView={delegation.referenceId ? (d) => setDelegationView(d) : undefined}
onView={
delegation.referenceId
? (d) => setDelegationView(d)
: undefined
}
onDelete={
delegation.referenceId
? () => setDelegationToDelete(delegation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type DelegationViewModalProps = {
} & Pick<ModalProps, 'onClose' | 'isVisible'>

export const DelegationViewModal = ({
delegation,
delegation,
direction = 'incoming',
onClose,
isAdminView,
Expand Down Expand Up @@ -97,13 +97,14 @@ export const DelegationViewModal = ({
)}
</Box>

{delegation?.type !== AuthDelegationType.GeneralMandate && delegation?.domain && (
<IdentityCard
label={formatMessage(m.domain)}
title={delegation.domain.displayName}
imgSrc={delegation.domain.organisationLogoUrl}
/>
)}
{delegation?.type !== AuthDelegationType.GeneralMandate &&
delegation?.domain && (
<IdentityCard
label={formatMessage(m.domain)}
title={delegation.domain.displayName}
imgSrc={delegation.domain.organisationLogoUrl}
/>
)}

{delegation?.type === AuthDelegationType.GeneralMandate && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,5 +246,5 @@ export const m = defineMessages({
viewDelegationModalTitle: {
id: 'sp.access-control-delegations:view-delegation-modal-title',
defaultMessage: 'Upplýsingar um umboð',
}
},
})

0 comments on commit 09f8e28

Please sign in to comment.