decord/alpha/source/modules/collectibles/hooks/useCurrentUser.tsx
github-actions 52331fb8ae chore: update source for alpha 349.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
2026-09-30 07:29:52 +00:00

25 lines
951 B
TypeScript

// Module ID: 7818
// Function ID: 7819
// Name: useCurrentUser
// Dependencies: [1372, 504, 38, 2]
// Exports: useCurrentUser, useCurrentUserIfAvailable
// Module 7818 (useCurrentUser)
import _modDef38 from "module_38" /* 38 */;
import initialize from "initialize" /* 504 */;
import UserStore from "UserStore" /* 1372 */;
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());
};