MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / SentryUserSync

Function SentryUserSync

apps/ui/src/app/providers/SentryUserSync.tsx:22–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 * unauthenticated errors aren't attributed to the last signed-in user.
21 */
22export const SentryUserSync = (): null => {
23 const me = useMe();
24 const userId = me.data?.user.id;
25 const userEmail = me.data?.user.email;
26
27 useEffect(() => {
28 if (userId !== undefined && userEmail !== undefined) {
29 Sentry.setUser({ id: userId, email: userEmail });
30
31 return;
32 }
33
34 Sentry.setUser(null);
35 }, [userId, userEmail]);
36
37 return null;
38};

Callers

nothing calls this directly

Calls 1

useMeFunction · 0.90

Tested by

no test coverage detected