30 lines
881 B
TypeScript
30 lines
881 B
TypeScript
// Metro module 8475 (f8476).
|
|
import useShouldOpenGameProfileModal from "./useShouldOpenGameProfileModal";
|
|
import GameProfileActionCreators_native from "../GameProfileActionCreators.native";
|
|
export default function useOpenGameProfileModal(a0) {
|
|
let c16608_0 = a0;
|
|
let r5 = arguments[1];
|
|
if (r5 === void 0) {
|
|
r5 = {};
|
|
}
|
|
const onOpened = r5.onOpened;
|
|
const gameProfileModalChecks = useShouldOpenGameProfileModal(a0);
|
|
const gameId = gameProfileModalChecks.gameId;
|
|
return gameProfileModalChecks.shouldOpenGameProfile ? gameId != null ? (a0) => {
|
|
if (a0 != null) {
|
|
a0.stopPropagation();
|
|
}
|
|
if (a0 != null) {
|
|
a0.preventDefault();
|
|
}
|
|
GameProfileActionCreators_native.openGameProfileModal({
|
|
...c16608_0,
|
|
gameId,
|
|
gameProfileModalChecks
|
|
});
|
|
if (onOpened != null) {
|
|
onOpened();
|
|
}
|
|
} : void 0 : void 0;
|
|
};
|