23 lines
819 B
TypeScript
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]);
|
|
};
|