diff --git a/src/lib/components/UserCard.tsx b/src/lib/components/UserCard.tsx index 17cc6ef..b955c04 100644 --- a/src/lib/components/UserCard.tsx +++ b/src/lib/components/UserCard.tsx @@ -1,8 +1,8 @@ import React from "react"; import { match } from "ts-pattern"; import { ACTION_MODE, MATCH_TYPE_LABEL_AND_COLOR } from "../constants"; -import type { BskyUser } from "../hooks/useRetrieveBskyUsers"; import AvatarFallbackSvg from "./Icons/AvatarFallbackSvg"; +import type { BskyUser } from "~types"; export type Props = { user: BskyUser; diff --git a/src/lib/hooks/useRetrieveBskyUsers.ts b/src/lib/hooks/useRetrieveBskyUsers.ts index df98587..697e32f 100644 --- a/src/lib/hooks/useRetrieveBskyUsers.ts +++ b/src/lib/hooks/useRetrieveBskyUsers.ts @@ -6,20 +6,7 @@ import { BskyServiceWorkerClient } from "~lib/bskyServiceWorkerClient"; import { type MESSAGE_NAMES, STORAGE_KEYS } from "~lib/constants"; import { searchBskyUser } from "~lib/searchBskyUsers"; import { XService } from "~lib/services/x"; -import type { CrawledUserInfo, MatchType } from "~types"; - -export type BskyUser = { - did: string; - avatar: string; - displayName: string; - handle: string; - description: string; - matchType: MatchType; - isFollowing: boolean; - followingUri: string | null; - isBlocking: boolean; - blockingUri: string | null; -}; +import type { BskyUser, CrawledUserInfo } from "~types"; export const useRetrieveBskyUsers = () => { const bskyClient = React.useRef(null); diff --git a/src/types.ts b/src/types.ts index aa5ef2a..2c915fa 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,7 +3,7 @@ import type { BSKY_USER_MATCH_TYPE, MESSAGE_NAMES } from "~lib/constants"; export type MatchType = (typeof BSKY_USER_MATCH_TYPE)[keyof typeof BSKY_USER_MATCH_TYPE]; -export type MESSAGE_NAME = (typeof MESSAGE_NAMES)[keyof typeof MESSAGE_NAMES]; +export type MessageName = (typeof MESSAGE_NAMES)[keyof typeof MESSAGE_NAMES]; export type BskyUser = { did: string;