ZS
export const getCurrentUser getCurrentUser
= guard({
source: $auth$auth, // store
filter: (authData) => authData.isAuthorized,
target: getCurrentUserFxgetCurrentUserFx,
});Size: a a a
ZS
= guard({
source: $auth$auth, // store
filter: (authData) => authData.isAuthorized,
target: getCurrentUserFxgetCurrentUserFx,
});YL
= guard({
source: $auth$auth, // store
filter: (authData) => authData.isAuthorized,
target: getCurrentUserFxgetCurrentUserFx,
});YL
YL
YL
YL
YL
YL
YL
YL
= guard({
source: $auth$auth, // store
filter: (authData) => authData.isAuthorized,
target: getCurrentUserFxgetCurrentUserFx,
});ZS
YL
ZS
YL
YL
ZS
= createEvent();= rootDomainrootDomain.createEffect({
handler: async ({ accessToken }) => accessToken && (await APIAPI.get<UserData>(urls.getUser(0))),
});sample({
source: $auth as any$auth as any,
clock: getCurrentUsergetCurrentUser,
target: getCurrentUserFxgetCurrentUserFx,
});React.useEffect(() => {
getCurrentUsergetCurrentUser();
}, []);🦜
= createEvent();= rootDomainrootDomain.createEffect({
handler: async ({ accessToken }) => accessToken && (await APIAPI.get<UserData>(urls.getUser(0))),
});sample({
source: $auth as any$auth as any,
clock: getCurrentUsergetCurrentUser,
target: getCurrentUserFxgetCurrentUserFx,
});React.useEffect(() => {
getCurrentUsergetCurrentUser();
}, []);🦜
🦜
= createEvent();= rootDomainrootDomain.createEffect({
handler: async ({ accessToken }) => accessToken && (await APIAPI.get<UserData>(urls.getUser(0))),
});sample({
source: $auth as any$auth as any,
clock: getCurrentUsergetCurrentUser,
target: getCurrentUserFxgetCurrentUserFx,
});React.useEffect(() => {
getCurrentUsergetCurrentUser();
}, []);