// Metro module 8515 (f8516). import { useRef, useCallback } from "react"; import { View } from "react-native"; import { createStyles } from "../../../../design/components/Styles/native/createStyles"; import Module712 from "../../../../_bundle/Module712"; import useAnalyticsLocations, { AnalyticsLocationProvider } from "../../../app_analytics/useAnalyticsLocations"; import AnalyticsLocation from "../../../app_analytics/AnalyticsLocation"; import GameProfileHeader from "./GameProfileHeader"; import GameProfileMedia from "./GameProfileMedia"; import GameProfileStoreLinks from "./GameProfileStoreLinks"; import GameProfileReviews from "./GameProfileReviews"; import GameProfileSummary from "./GameProfileSummary"; import GameProfileLinkAccount from "./GameProfileLinkAccount"; import GameProfileCommunity from "./GameProfileCommunity"; import GameProfileAnnouncements from "./GameProfileAnnouncements"; import GameProfileShopCarousel from "./GameProfileShopCarousel"; import GameProfileSimilarGames from "./GameProfileSimilarGames"; import GameProfileDetails from "./GameProfileDetails"; import GameProfileGameClaimCta from "./GameProfileGameClaimCta"; import GameProfileReportButton from "./GameProfileReportButton"; const useStyles = createStyles({ container: { flex: 1, backgroundColor: Module712.colors.BACKGROUND_BASE_LOWEST, paddingBottom: Module712.space.PX_16 }, body: { flexDirection: "column", paddingVertical: Module712.space.PX_16, paddingHorizontal: Module712.space.PX_16, gap: Module712.space.PX_32, maxWidth: 520, alignSelf: "center", width: "100%" }, buttonsContainer: { flexDirection: "column", gap: Module712.space.PX_8 } }); export default function GameProfileView(props) { const { game, invite, viewId, source, trackAction, onGuildInviteResolved, closeModal, scrollY, websiteButtons, onStoreLinksMeasured, onHeaderHeightMeasured, scrollOffsetRef } = props; const styles = useStyles(); const ref = useRef(null); const ref2 = useRef(null); const analyticsLocations = useAnalyticsLocations(AnalyticsLocation.GAME_PROFILE).analyticsLocations; const callback = useCallback(() => { const current = ref.current; const current2 = ref2.current; if (current != null && current2 != null && onStoreLinksMeasured != null) { onStoreLinksMeasured(current + current2); } }, [onStoreLinksMeasured]); return { ref.current = event.nativeEvent.layout.y; callback(); }}> {websiteButtons.length > 0 && { const layout = event.nativeEvent.layout; ref2.current = layout.y + layout.height; callback(); }}> } ; };