MCPcopy
hub / github.com/codeaashu/claude-code / TeleportError

Function TeleportError

src/components/TeleportError.tsx:21–169  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

19// re-fire on every render.
20const EMPTY_ERRORS_TO_IGNORE: ReadonlySet<TeleportLocalErrorType> = new Set();
21export function TeleportError(t0) {
22 const $ = _c(18);
23 const {
24 onComplete,
25 errorsToIgnore: t1
26 } = t0;
27 const errorsToIgnore = t1 === undefined ? EMPTY_ERRORS_TO_IGNORE : t1;
28 const [currentError, setCurrentError] = useState(null);
29 const [isLoggingIn, setIsLoggingIn] = useState(false);
30 let t2;
31 if ($[0] !== errorsToIgnore || $[1] !== onComplete) {
32 t2 = async () => {
33 const currentErrors = await getTeleportErrors();
34 const filteredErrors = new Set(Array.from(currentErrors).filter(error => !errorsToIgnore.has(error)));
35 if (filteredErrors.size === 0) {
36 onComplete();
37 return;
38 }
39 if (filteredErrors.has("needsLogin")) {
40 setCurrentError("needsLogin");
41 } else {
42 if (filteredErrors.has("needsGitStash")) {
43 setCurrentError("needsGitStash");
44 }
45 }
46 };
47 $[0] = errorsToIgnore;
48 $[1] = onComplete;
49 $[2] = t2;
50 } else {
51 t2 = $[2];
52 }
53 const checkErrors = t2;
54 let t3;
55 let t4;
56 if ($[3] !== checkErrors) {
57 t3 = () => {
58 checkErrors();
59 };
60 t4 = [checkErrors];
61 $[3] = checkErrors;
62 $[4] = t3;
63 $[5] = t4;
64 } else {
65 t3 = $[4];
66 t4 = $[5];
67 }
68 useEffect(t3, t4);
69 const onCancel = _temp;
70 let t5;
71 if ($[6] !== checkErrors) {
72 t5 = () => {
73 setIsLoggingIn(false);
74 checkErrors();
75 };
76 $[6] = checkErrors;
77 $[7] = t5;
78 } else {

Callers

nothing calls this directly

Calls 3

getTeleportErrorsFunction · 0.85
onCancelFunction · 0.50
hasMethod · 0.45

Tested by

no test coverage detected