diff --git a/src/frontend/hooks/useProjectInvitesListener.ts b/src/frontend/hooks/useProjectInvitesListener.ts index b4a7a3e06..8a8facf71 100644 --- a/src/frontend/hooks/useProjectInvitesListener.ts +++ b/src/frontend/hooks/useProjectInvitesListener.ts @@ -2,11 +2,7 @@ import {useCallback, useEffect, useState} from 'react'; import {useApi} from '../contexts/ApiContext'; import {useQueryClient} from '@tanstack/react-query'; import {INVITE_KEY} from './server/invites'; -import {MapBuffers} from '@comapeo/core/dist/types'; -import { - InviteInternal, - InviteRemovalReason, -} from '@comapeo/core/dist/invite-api'; +import {Invite, InviteRemovalReason} from '@comapeo/core/dist/invite-api'; export const useProjectInvitesListener = ({ inviteId, @@ -25,10 +21,7 @@ export const useProjectInvitesListener = ({ }, [queryClient]); useEffect(() => { - function shouldInterceptCancel( - val: MapBuffers, - reason: InviteRemovalReason, - ) { + function shouldInterceptCancel(val: Invite, reason: InviteRemovalReason) { if ( reason === 'canceled' && inviteId === val.inviteId && diff --git a/src/frontend/sharedComponents/ProjectInviteBottomSheet/index.tsx b/src/frontend/sharedComponents/ProjectInviteBottomSheet/index.tsx index f6604037d..e4cbf1791 100644 --- a/src/frontend/sharedComponents/ProjectInviteBottomSheet/index.tsx +++ b/src/frontend/sharedComponents/ProjectInviteBottomSheet/index.tsx @@ -1,9 +1,5 @@ import * as React from 'react'; -import {MapBuffers} from '@comapeo/core/dist/types'; -import { - InviteInternal, - InviteRemovalReason, -} from '@comapeo/core/dist/invite-api'; +import {Invite, InviteRemovalReason} from '@comapeo/core/dist/invite-api'; import {BottomSheetModal, useBottomSheetModal} from '../BottomSheetModal'; import { @@ -174,14 +170,12 @@ export const ProjectInviteBottomSheet = ({ function useAcceptedInvite() { const api = useApi(); - const [acceptedInvite, setAcceptedInvite] = - React.useState | null>(null); + const [acceptedInvite, setAcceptedInvite] = React.useState( + null, + ); React.useEffect(() => { - function onInviteRemoved( - invite: MapBuffers, - reason: InviteRemovalReason, - ) { + function onInviteRemoved(invite: Invite, reason: InviteRemovalReason) { if (reason === 'accepted') { setAcceptedInvite(invite); }