decord/source/modules/activities/utils/useCurrentEmbeddedApplication.tsx

33 lines
984 B
TypeScript
Raw Normal View History

// Module ID: 9762
// Function ID: 9763
2026-07-20 16:05:17 +00:00
// Name: useCurrentEmbeddedApplication
// Dependencies: [32, 9763, 7271, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 9762 (useCurrentEmbeddedApplication)
import useGetOrFetchApplicationsDefault from "useGetOrFetchApplications" /* 7271 */;
import useCurrentEmbeddedActivityDefault from "useCurrentEmbeddedActivity" /* 9763 */;
import _slicedToArray from "module_32" /* 32 */;
2026-07-23 10:11:24 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("modules/activities/utils/useCurrentEmbeddedApplication.tsx");
2026-07-20 16:05:17 +00:00
export default function useCurrentEmbeddedApplication() {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
}
let flag = obj.fetchesApplication;
if (flag === undefined) {
flag = true;
}
2026-08-24 06:08:38 +00:00
const tmp = useCurrentEmbeddedActivityDefault();
2026-07-20 16:05:17 +00:00
if (null == tmp) {
let items = [];
} else {
items = [tmp.applicationId];
}
const first = _slicedToArray(useGetOrFetchApplicationsDefault(items, flag), 1)[0];
2026-07-29 08:29:29 +00:00
return first;
2026-07-20 16:05:17 +00:00
};