decord/source/modules/self_mod/hooks/useChannelSafetyWarning.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

38 lines
1.3 KiB
TypeScript

// Module ID: 10973
// Function ID: 10974
// Name: useChannelSafetyWarning
// Dependencies: [10915, 504, 2]
// Exports: useChannelSafetyWarning
// Module 10973 (useChannelSafetyWarning)
import closure_2 from "handleConnectionOpen" /* 10915 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/self_mod/hooks/useChannelSafetyWarning.tsx");
export const useChannelSafetyWarning = function useChannelSafetyWarning(channelId, LIKELY_ATO) {
const _require = channelId;
dependencyMap = LIKELY_ATO;
const items = [closure_2];
const items1 = [channelId];
const stateFromStores = _require(504).useStateFromStores(items, () => closure_1_2.getChannelSafetyWarnings(closure_0), items1);
const found = stateFromStores.filter((type) => type.type === closure_1);
return found.find((dismiss_timestamp) => {
let tmp = null == dismiss_timestamp.dismiss_timestamp;
if (tmp) {
let expiry;
if (dismiss_timestamp != null) {
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;
});
};