decord/alpha/source/modules/collectibles/hooks/useCurrentUser.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

25 lines
951 B
TypeScript

// Module ID: 7805
// Function ID: 7806
// Name: useCurrentUser
// Dependencies: [1372, 504, 38, 2]
// Exports: useCurrentUser, useCurrentUserIfAvailable
// Module 7805 (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());
};