mirror of
https://github.com/snachodog/tok-to-insta-follower-bridge.git
synced 2025-09-12 23:23:31 -06:00
fix: lint
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { AtUri, type AtpSessionData, AtpAgent } from "@atproto/api";
|
||||
import { AtUri, AtpAgent, type AtpSessionData } from "@atproto/api";
|
||||
|
||||
// try and cut down the amount of session resumes by caching the clients
|
||||
const clientCache = new Map<string, BskyClient>()
|
||||
const clientCache = new Map<string, BskyClient>();
|
||||
|
||||
export type BskyLoginParams = {
|
||||
identifier: string;
|
||||
@@ -29,20 +29,19 @@ export class BskyClient {
|
||||
|
||||
public static createAgentFromSession(session: AtpSessionData): BskyClient {
|
||||
if (clientCache.has(session.did)) {
|
||||
return clientCache.get(session.did)
|
||||
} else {
|
||||
const client = new BskyClient();
|
||||
client.agent.resumeSession(session);
|
||||
client.me = {
|
||||
did: session.did,
|
||||
handle: session.handle,
|
||||
email: session.email,
|
||||
};
|
||||
|
||||
clientCache.set(session.did, client);
|
||||
|
||||
return client;
|
||||
return clientCache.get(session.did);
|
||||
}
|
||||
const client = new BskyClient();
|
||||
client.agent.resumeSession(session);
|
||||
client.me = {
|
||||
did: session.did,
|
||||
handle: session.handle,
|
||||
email: session.email,
|
||||
};
|
||||
|
||||
clientCache.set(session.did, client);
|
||||
|
||||
return client;
|
||||
}
|
||||
|
||||
public static async createAgent({
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import React from "react";
|
||||
import type React from "react";
|
||||
|
||||
export type Props = {
|
||||
children: React.ReactNode;
|
||||
|
@@ -3,7 +3,7 @@ import { BskyServiceWorkerClient } from "~lib/bskyServiceWorkerClient";
|
||||
import {
|
||||
ACTION_MODE,
|
||||
BSKY_USER_MATCH_TYPE,
|
||||
MESSAGE_NAMES,
|
||||
type MESSAGE_NAMES,
|
||||
MESSAGE_NAME_TO_ACTION_MODE_MAP,
|
||||
MESSAGE_NAME_TO_QUERY_PARAM_MAP,
|
||||
} from "~lib/constants";
|
||||
@@ -222,6 +222,7 @@ export const useRetrieveBskyUsers = () => {
|
||||
setLoading(true);
|
||||
showModal();
|
||||
},
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: todo
|
||||
[startRetrieveLoop, showModal],
|
||||
);
|
||||
|
||||
@@ -257,7 +258,7 @@ export const useRetrieveBskyUsers = () => {
|
||||
[],
|
||||
);
|
||||
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: todo
|
||||
const filteredUsers = React.useMemo(() => {
|
||||
return users.filter((user) => {
|
||||
return matchTypeFilter[user.matchType];
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { isSimilarUser } from "~lib/bskyHelpers";
|
||||
import { getAccountNameAndDisplayName } from "~lib/domHelpers";
|
||||
import type { getAccountNameAndDisplayName } from "~lib/domHelpers";
|
||||
import { isOneSymbol } from "~lib/utils";
|
||||
import type { BskyServiceWorkerClient } from "./bskyServiceWorkerClient";
|
||||
|
||||
|
Reference in New Issue
Block a user