decord/beta/source/modules/collectibles/hooks/useCurrentUser.tsx
github-actions 19e52f659f chore: update source for beta 347.11
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-26 17:57:22 +00:00

25 lines
951 B
TypeScript

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