decord/source/modules/collectibles/hooks/useCurrentUser.tsx

26 lines
951 B
TypeScript
Raw Normal View History

// Module ID: 8307
// Function ID: 8308
2026-07-20 16:05:17 +00:00
// Name: useCurrentUser
// Dependencies: [1372, 504, 38, 2]
2026-07-20 16:05:17 +00:00
// Exports: useCurrentUser, useCurrentUserIfAvailable
// Module 8307 (useCurrentUser)
2026-08-24 06:08:38 +00:00
import _modDef38 from "module_38" /* 38 */;
import initialize from "initialize" /* 504 */;
import UserStore from "UserStore" /* 1372 */;
2026-07-23 10:11:24 +00:00
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/collectibles/hooks/useCurrentUser.tsx");
2026-07-20 16:05:17 +00:00
export const useCurrentUser = function useCurrentUser() {
const items = [UserStore];
2026-08-24 06:08:38 +00:00
const stateFromStores = initialize.useStateFromStores(items, () => currentUser.getCurrentUser());
_modDef38(null != stateFromStores, "user has to be signed in before accessing shop");
2026-07-20 16:05:17 +00:00
return stateFromStores;
};
export const useCurrentUserIfAvailable = function useCurrentUserIfAvailable() {
const items = [UserStore];
2026-08-24 06:08:38 +00:00
return initialize.useStateFromStores(items, () => currentUser.getCurrentUser());
2026-07-20 16:05:17 +00:00
};