refacotr: move type

This commit is contained in:
kawamataryo 2024-11-19 22:12:41 +09:00
parent fb0b439137
commit 7c5c65f0ed
3 changed files with 3 additions and 16 deletions

View File

@ -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;

View File

@ -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<BskyServiceWorkerClient | null>(null);

View File

@ -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;