@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
tsx 17 lines 495 Bytes
Raw
1 import { useClerk } from "@clerk/react";
2
3 import { isElectron } from "../../env";
4 import { resolveClerkSignInProps } from "./authRedirect";
5 import { retryClerkLoad } from "./clerkLoadFailure";
6
7 export function useT3ConnectAuthPrompt() {
8 const clerk = useClerk();
9 const openAuthPrompt = () => {
10 if (clerk.status === "error") {
11 retryClerkLoad();
12 return;
13 }
14 clerk.openSignIn(resolveClerkSignInProps(window.location.href, isElectron));
15 };
16 return { openAuthPrompt };
17 }