Files
discord-decomp/modules/user_profile/hooks/native/useTrackUserProfileActivityView.tsx
T
2026-11-01 12:12:55 +02:00

23 lines
819 B
TypeScript

// Metro module 12014 (f12015).
import { useEffect, useState } from "react";
import ContentInventoryOutboxStore from "../../../content_inventory/ContentInventoryOutboxStore";
import { useStateFromStores } from "../../../../_bundle/Module589";
export default function useTrackUserProfileActivityView({ userId, onAction }) {
let setState, c19333_3;
setState = void 0;
c19333_3 = void 0;
const stateFromStores = useStateFromStores([ContentInventoryOutboxStore], () => ContentInventoryOutboxStore.isFetchingUserOutbox(userId));
let state;
[state, setState] = useState(false);
const r24 = stateFromStores ? !stateFromStores : !state;
c19333_3 = r24;
useEffect(() => {
if (c19333_3) {
onAction({
action: "VIEW_ACTIVITY_CARD"
});
setState(true);
}
}, [r24, onAction]);
};