decord/stable/source/modules/collectibles/hooks/useCurrentUser.tsx
github-actions e2bc0408ee chore: update source for stable 346.13
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-22 22:11:40 +00:00

25 lines
951 B
TypeScript

// Module ID: 8295
// Function ID: 8296
// Name: useCurrentUser
// Dependencies: [1371, 504, 38, 2]
// Exports: useCurrentUser, useCurrentUserIfAvailable
// Module 8295 (useCurrentUser)
import _modDef38 from "module_38" /* 38 */;
import initialize from "initialize" /* 504 */;
import UserStore from "UserStore" /* 1371 */;
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/collectibles/hooks/useCurrentUser.tsx");
export const useCurrentUser = function useCurrentUser() {
const items = [UserStore];
const stateFromStores = initialize.useStateFromStores(items, () => currentUser.getCurrentUser());
_modDef38(null != stateFromStores, "user has to be signed in before accessing shop");
return stateFromStores;
};
export const useCurrentUserIfAvailable = function useCurrentUserIfAvailable() {
const items = [UserStore];
return initialize.useStateFromStores(items, () => currentUser.getCurrentUser());
};