decord/source/modules/self_mod/hooks/useChannelSafetyWarning.tsx

39 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 10410
// Function ID: 10411
2026-07-20 16:05:17 +00:00
// Name: useChannelSafetyWarning
2026-08-25 06:04:03 +00:00
// Dependencies: [9818, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: useChannelSafetyWarning
2026-08-25 06:04:03 +00:00
// Module 10410 (useChannelSafetyWarning)
import closure_2 from "handleConnectionOpen" /* 9818 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
const result = require("set").fileFinishedImporting("modules/self_mod/hooks/useChannelSafetyWarning.tsx");
2026-07-20 16:05:17 +00:00
export const useChannelSafetyWarning = function useChannelSafetyWarning(channelId, LIKELY_ATO) {
2026-07-23 10:11:24 +00:00
const _require = channelId;
2026-08-24 06:08:38 +00:00
dependencyMap = LIKELY_ATO;
const items = [closure_2];
2026-07-20 16:05:17 +00:00
const items1 = [channelId];
2026-08-24 06:08:38 +00:00
const stateFromStores = _require(589).useStateFromStores(items, () => closure_1_2.getChannelSafetyWarnings(closure_0), items1);
2026-07-23 10:11:24 +00:00
const found = stateFromStores.filter((type) => type.type === closure_1);
2026-07-20 16:05:17 +00:00
return found.find((dismiss_timestamp) => {
let tmp = null == dismiss_timestamp.dismiss_timestamp;
if (tmp) {
let expiry;
2026-07-29 08:29:29 +00:00
if (dismiss_timestamp != null) {
2026-07-20 16:05:17 +00:00
expiry = dismiss_timestamp.expiry;
}
let tmp3 = null == expiry;
if (!tmp3) {
const _Date = Date;
const _Date2 = Date;
const parsed = Date.parse(dismiss_timestamp.expiry);
tmp3 = parsed > Date.now();
}
tmp = tmp3;
}
return tmp;
});
};