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

42 lines
1.4 KiB
TypeScript
Raw Normal View History

// Module ID: 11045
// Function ID: 11046
2026-07-20 16:05:17 +00:00
// Name: useChannelSafetyWarning
// Dependencies: [10987, 504, 2]
2026-07-20 16:05:17 +00:00
// Exports: useChannelSafetyWarning
// Module 11045 (useChannelSafetyWarning)
import ChannelSafetyWarningsStore from "ChannelSafetyWarningsStore" /* 10987 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/self_mod/hooks/useChannelSafetyWarning.tsx");
2026-07-20 16:05:17 +00:00
export const useChannelSafetyWarning = function useChannelSafetyWarning(channelId, LIKELY_ATO) {
_require = channelId;
2026-08-24 06:08:38 +00:00
dependencyMap = LIKELY_ATO;
const items = [ChannelSafetyWarningsStore];
2026-07-20 16:05:17 +00:00
const items1 = [channelId];
const stateFromStores = require("initialize").useStateFromStores(items, () => ChannelSafetyWarningsStore.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;
});
};