diff --git a/packages/pl-fe/src/actions/auth.ts b/packages/pl-fe/src/actions/auth.ts index d2e4d125f..ec210935b 100644 --- a/packages/pl-fe/src/actions/auth.ts +++ b/packages/pl-fe/src/actions/auth.ts @@ -7,11 +7,12 @@ * @see module:pl-fe/actions/security */ import { + type Account, credentialAccountSchema, - PlApiClient, type CreateAccountParams, type CredentialAccount, type CredentialApplication, + PlApiClient, type Token, } from 'pl-api'; import { defineMessages } from 'react-intl'; @@ -37,7 +38,6 @@ import { type PlfeResponse, getClient } from '../api'; import { importEntities } from './importer'; -import type { Account } from 'pl-api'; import type { AppDispatch, RootState } from 'pl-fe/store'; const SWITCH_ACCOUNT = 'SWITCH_ACCOUNT' as const; diff --git a/packages/pl-fe/src/api/hooks/admin/use-verify.ts b/packages/pl-fe/src/api/hooks/admin/use-verify.ts index 988e265e4..797d6b866 100644 --- a/packages/pl-fe/src/api/hooks/admin/use-verify.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-verify.ts @@ -1,8 +1,8 @@ import { useTransaction } from 'pl-fe/entity-store/hooks/use-transaction'; import { useClient } from 'pl-fe/hooks/use-client'; -import type { EntityCallbacks } from 'pl-fe/entity-store/hooks/types'; import type { Account } from 'pl-api'; +import type { EntityCallbacks } from 'pl-fe/entity-store/hooks/types'; const useVerify = () => { const client = useClient(); diff --git a/packages/pl-fe/src/reducers/auth.ts b/packages/pl-fe/src/reducers/auth.ts index 1c20329b2..57c87bfe6 100644 --- a/packages/pl-fe/src/reducers/auth.ts +++ b/packages/pl-fe/src/reducers/auth.ts @@ -1,6 +1,6 @@ import trim from 'lodash/trim'; import { create, Draft } from 'mutative'; -import { applicationSchema, instanceSchema, PlApiClient, tokenSchema, type CredentialAccount, type CredentialApplication, type Token } from 'pl-api'; +import { type Account as AccountEntity, applicationSchema, instanceSchema, PlApiClient, tokenSchema, type CredentialAccount, type CredentialApplication, type Token } from 'pl-api'; import * as v from 'valibot'; import { decodeFromMarkup, MASTODON_PRELOAD_IMPORT, pleromaDecoder, type PreloadAction } from 'pl-fe/actions/preload'; @@ -22,7 +22,6 @@ import { import { ME_FETCH_SKIP, type MeAction } from '../actions/me'; import type { PlfeResponse } from 'pl-fe/api'; -import type { Account as AccountEntity } from 'pl-api'; const instance = (() => { try { diff --git a/packages/pl-fe/src/utils/accounts.test.ts b/packages/pl-fe/src/utils/accounts.test.ts deleted file mode 100644 index 4177556b9..000000000 --- a/packages/pl-fe/src/utils/accounts.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { AccountRecord } from 'pl-fe/normalizers/account'; - -import { - getDomain, -} from './accounts'; - -import type { ReducerAccount } from 'pl-fe/reducers/accounts'; - -describe('getDomain', () => { - const account = AccountRecord({ - acct: 'alice', - url: 'https://party.com/users/alice', - }) as ReducerAccount; - it('returns the domain', () => { - expect(getDomain(account)).toEqual('party.com'); - }); -});