Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions dotcom-rendering/src/web/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ import {
HydrateInteractiveOnce,
} from '@frontend/web/components/HydrateOnce';
import { Lazy } from '@frontend/web/components/Lazy';
import { Placeholder } from '@root/src/web/components/Placeholder';

import { decideTheme } from '@root/src/web/lib/decideTheme';
import { decideDisplay } from '@root/src/web/lib/decideDisplay';
import { decideDesign } from '@root/src/web/lib/decideDesign';
Expand Down Expand Up @@ -112,16 +110,6 @@ const OnwardsLower = React.lazy(() => {
return { default: module.OnwardsLower };
});
});
const GetMatchStats = React.lazy(() => {
const { start, end } = initPerf('GetMatchStats');
start();
return import(
/* webpackChunkName: "GetMatchStats" */ '@frontend/web/components/GetMatchStats'
).then((module) => {
end();
return { default: module.GetMatchStats };
});
});

type Props = {
CAPI: CAPIBrowserType;
Expand Down Expand Up @@ -1023,15 +1011,6 @@ export const App = ({ CAPI, ophanRecord }: Props) => {
</Suspense>
</Lazy>
</Portal>
{CAPI.matchUrl && (
<Portal rootId="match-stats">
<Lazy margin={300}>
<Suspense fallback={<Placeholder height={800} />}>
<GetMatchStats matchUrl={CAPI.matchUrl} />
</Suspense>
</Lazy>
</Portal>
)}
<Portal rootId="slot-body-end">
<SlotBodyEnd
contentType={CAPI.contentType}
Expand Down
13 changes: 12 additions & 1 deletion dotcom-rendering/src/web/layouts/StandardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import {
import { Stuck, BannerWrapper } from '@root/src/web/layouts/lib/stickiness';
import { Lines } from '@guardian/source-react-components-development-kitchen';
import { Island } from '../components/Island';
import { GetMatchStats } from '../components/GetMatchStats.importable';

const StandardGrid = ({
children,
Expand Down Expand Up @@ -617,7 +618,17 @@ export const StandardLayout = ({ CAPI, NAV, format, palette }: Props) => {
pageId={CAPI.pageId}
webTitle={CAPI.webTitle}
/>
{isMatchReport && <div id="match-stats" />}
{isMatchReport && CAPI.matchUrl && (
<Island
clientOnly={true}
placeholderHeight={800}
deferUntil="visible"
>
<GetMatchStats
matchUrl={CAPI.matchUrl}
/>
</Island>
)}

{showBodyEndSlot && <div id="slot-body-end" />}
<Lines
Expand Down