mirror of
https://github.com/snachodog/tok-to-insta-follower-bridge.git
synced 2025-04-23 20:12:22 -06:00
refacotr: move type
This commit is contained in:
parent
fb0b439137
commit
7c5c65f0ed
@ -1,8 +1,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { match } from "ts-pattern";
|
import { match } from "ts-pattern";
|
||||||
import { ACTION_MODE, MATCH_TYPE_LABEL_AND_COLOR } from "../constants";
|
import { ACTION_MODE, MATCH_TYPE_LABEL_AND_COLOR } from "../constants";
|
||||||
import type { BskyUser } from "../hooks/useRetrieveBskyUsers";
|
|
||||||
import AvatarFallbackSvg from "./Icons/AvatarFallbackSvg";
|
import AvatarFallbackSvg from "./Icons/AvatarFallbackSvg";
|
||||||
|
import type { BskyUser } from "~types";
|
||||||
|
|
||||||
export type Props = {
|
export type Props = {
|
||||||
user: BskyUser;
|
user: BskyUser;
|
||||||
|
@ -6,20 +6,7 @@ import { BskyServiceWorkerClient } from "~lib/bskyServiceWorkerClient";
|
|||||||
import { type MESSAGE_NAMES, STORAGE_KEYS } from "~lib/constants";
|
import { type MESSAGE_NAMES, STORAGE_KEYS } from "~lib/constants";
|
||||||
import { searchBskyUser } from "~lib/searchBskyUsers";
|
import { searchBskyUser } from "~lib/searchBskyUsers";
|
||||||
import { XService } from "~lib/services/x";
|
import { XService } from "~lib/services/x";
|
||||||
import type { CrawledUserInfo, MatchType } from "~types";
|
import type { BskyUser, CrawledUserInfo } 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;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const useRetrieveBskyUsers = () => {
|
export const useRetrieveBskyUsers = () => {
|
||||||
const bskyClient = React.useRef<BskyServiceWorkerClient | null>(null);
|
const bskyClient = React.useRef<BskyServiceWorkerClient | null>(null);
|
||||||
|
@ -3,7 +3,7 @@ import type { BSKY_USER_MATCH_TYPE, MESSAGE_NAMES } from "~lib/constants";
|
|||||||
export type MatchType =
|
export type MatchType =
|
||||||
(typeof BSKY_USER_MATCH_TYPE)[keyof typeof BSKY_USER_MATCH_TYPE];
|
(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 = {
|
export type BskyUser = {
|
||||||
did: string;
|
did: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user