MCPcopy Create free account
hub / github.com/cursor/community-plugins / getUser

Function getUser

apps/cursor/src/components/user-menu.tsx:45–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44 useEffect(() => {
45 async function getUser() {
46 setIsLoading(true);
47 const session = await supabase.auth.getSession();
48
49 if (!session.data.session) {
50 setIsLoading(false);
51 return;
52 }
53
54 const { data } = await supabase
55 .from("users")
56 .select("id, slug, name, image")
57 .eq("id", session.data.session?.user?.id)
58 .single();
59
60 setUser(data);
61 setIsLoading(false);
62 }
63
64 if (!user) {
65 getUser();

Callers 1

UserMenuFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected