MCPcopy Create free account
hub / github.com/codeaashu/claude-code / _temp2

Function _temp2

src/hooks/notifs/useCanSwitchToExistingSubscription.tsx:21–36  ·  view source on GitHub ↗

* Checks if the user has a subscription but is not currently logged into it. * This helps inform users they should run /login to access their subscription.

()

Source from the content-addressed store, hash-verified

19 * This helps inform users they should run /login to access their subscription.
20 */
21async function _temp2() {
22 if ((getGlobalConfig().subscriptionNoticeCount ?? 0) >= MAX_SHOW_COUNT) {
23 return null;
24 }
25 const subscriptionType = await getExistingClaudeSubscription();
26 if (subscriptionType === null) {
27 return null;
28 }
29 saveGlobalConfig(_temp);
30 logEvent("tengu_switch_to_subscription_notice_shown", {});
31 return {
32 key: "switch-to-subscription",
33 jsx: <Text color="suggestion">Use your existing Claude {subscriptionType} plan with Claude Code<Text color="text" dimColor={true}>{" "}· /login to activate</Text></Text>,
34 priority: "low"
35 };
36}
37function _temp(current) {
38 return {
39 ...current,

Callers

nothing calls this directly

Calls 4

getGlobalConfigFunction · 0.85
saveGlobalConfigFunction · 0.85
logEventFunction · 0.85

Tested by

no test coverage detected