Skip to content

Commit

Permalink
fix pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnlaugurG committed Oct 1, 2024
1 parent 482841d commit f6e0e7f
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { useEffect, useState } from 'react'

import { useAuth } from '@island.is/auth/react'
import { Box, toast, useBreakpoint } from '@island.is/island-ui/core'
import { useLocale } from '@island.is/localization'
import { formatNationalId } from '@island.is/portals/core'
import { Problem } from '@island.is/react-spa/shared'
import { useEffect, useState } from 'react'
import { DelegationsFormFooter } from '../../delegations/DelegationsFormFooter'
import { Modal, ModalProps } from '@island.is/react/components'
import { AuthDelegationType } from '@island.is/shared/types'

import { DelegationsFormFooter } from '../../delegations/DelegationsFormFooter'
import { IdentityCard } from '../../IdentityCard/IdentityCard'
import { AccessListContainer } from '../AccessList/AccessListContainer/AccessListContainer'
import { useAuthScopeTreeLazyQuery } from '../AccessList/AccessListContainer/AccessListContainer.generated'
Expand All @@ -16,7 +19,6 @@ import {
} from '../../../types/customDelegation'
import { m } from '../../../lib/messages'
import { useDynamicShadow } from '../../../hooks/useDynamicShadow'
import { AuthDelegationType } from '@island.is/shared/types'

type AccessDeleteModalProps = Pick<ModalProps, 'onClose' | 'isVisible'> & {
delegation?: AuthCustomDelegation
Expand All @@ -38,11 +40,11 @@ export const AccessDeleteModal = ({
useAuthScopeTreeLazyQuery()

useEffect(() => {
if (delegation) {
if (delegation && delegation.domain?.name) {
getAuthScopeTree({
variables: {
input: {
domain: delegation.domain?.name ?? null,
domain: delegation.domain.name,
lang,
},
},
Expand Down

0 comments on commit f6e0e7f

Please sign in to comment.