This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,20 @@
// Metro module 9878 (f9879).
import { useState, useEffect } from "react";
import ChannelFollowerStatsStore from "../../stores/ChannelFollowerStatsStore";
import Durations from "../../utils/Durations";
import { useStateFromStores } from "../../_bundle/Module589";
import ChannelFollowerActionCreators from "../../actions/ChannelFollowerActionCreators";
let c6549_6 = 1 * Durations.Millis.HOUR;
export default function useChannelFollowerStats(a0) {
const [state, setState] = useState(false);
const stateFromStores = useStateFromStores([ChannelFollowerStatsStore], () => ChannelFollowerStatsStore.getFollowerStatsForChannel(a0), [a0]);
useEffect(() => {
if (!(stateFromStores != null && !(Date.now() - stateFromStores.lastFetched > c6549_6)) && !state) {
setState(true);
ChannelFollowerActionCreators.fetchChannelFollowerStats(a0);
} else if (stateFromStores != null && state) {
setState(false);
}
}, [a0, stateFromStores, state]);
return [stateFromStores, state];
};