Skip to content

Commit

Permalink
Merge branch 'latest' into upgrade-web-vitals
Browse files Browse the repository at this point in the history
  • Loading branch information
amoore108 authored Nov 21, 2024
2 parents 45b37ec + 18f1a77 commit 49d9ece
Show file tree
Hide file tree
Showing 8 changed files with 490 additions and 486 deletions.
4 changes: 0 additions & 4 deletions src/app/lib/config/services/sinhala.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,6 @@ export const service: DefaultServiceConfig = {
title: 'මුල් පිටුව',
url: '/sinhala',
},
{
title: 'මහ මැතිවරණය 2024',
url: '/sinhala/topics/c5y3ve4z2lkt',
},
{
title: 'ශ්‍රී ලංකා',
url: '/sinhala/topics/cg7267dz901t',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,34 +74,27 @@ exports[`Canonical Sinhala Live Radio Page Header Navigation link should match t
`;

exports[`Canonical Sinhala Live Radio Page Header Navigation link should match text and url 2`] = `
{
"text": "මහ මැතිවරණය 2024",
"url": "/sinhala/topics/c5y3ve4z2lkt",
}
`;

exports[`Canonical Sinhala Live Radio Page Header Navigation link should match text and url 3`] = `
{
"text": "ශ්‍රී ලංකා",
"url": "/sinhala/topics/cg7267dz901t",
}
`;

exports[`Canonical Sinhala Live Radio Page Header Navigation link should match text and url 4`] = `
exports[`Canonical Sinhala Live Radio Page Header Navigation link should match text and url 3`] = `
{
"text": "ලෝකය",
"url": "/sinhala/topics/c83plvepnq1t",
}
`;

exports[`Canonical Sinhala Live Radio Page Header Navigation link should match text and url 5`] = `
exports[`Canonical Sinhala Live Radio Page Header Navigation link should match text and url 4`] = `
{
"text": "වීඩියෝ",
"url": "/sinhala/topics/crldzm9n2lnt",
}
`;

exports[`Canonical Sinhala Live Radio Page Header Navigation link should match text and url 6`] = `
exports[`Canonical Sinhala Live Radio Page Header Navigation link should match text and url 5`] = `
{
"text": "කලා",
"url": "/sinhala/topics/c7zp5zxk8jxt",
Expand Down
6 changes: 5 additions & 1 deletion ws-nextjs-app/pages/[service]/[[...]].page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import React from 'react';
import { GetServerSideProps } from 'next';
import dynamic from 'next/dynamic';
import logResponseTime from '#server/utilities/logResponseTime';
import isLitePath from '#app/routes/utils/isLitePath';
import extractHeaders from '#server/utilities/extractHeaders';
// AV Embeds
import { AV_EMBEDS } from '#app/routes/utils/pageTypes';
import AvEmbedsPageLayout from './av-embeds/AvEmbedsPageLayout';
import handleAvRoute from './av-embeds/handleAvRoute';
import { AvEmbedsPageProps } from './av-embeds/types';

const AvEmbedsPageLayout = dynamic(
() => import('./av-embeds/AvEmbedsPageLayout'),
);

type PageProps = {
pageType?: typeof AV_EMBEDS | null;
} & AvEmbedsPageProps;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { GetServerSideProps } from 'next';
import dynamic from 'next/dynamic';
import { DOWNLOADS_PAGE } from '#app/routes/utils/pageTypes';
import logResponseTime from '#server/utilities/logResponseTime';

import PageDataParams from '#app/models/types/pageDataParams';
import getToggles from '#app/lib/utilities/getToggles/withCache';
import dataFetch from './dataFetch';

import downloadsPageLayout from './downloadsPageLayout';
import extractHeaders from '../../../../src/server/utilities/extractHeaders';

const downloadsPageLayout = dynamic(() => import('./downloadsPageLayout'));

const pageTitle = '다운로드 - BBC News 코리아';

const atiData = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { GetServerSideProps } from 'next';
import dynamic from 'next/dynamic';

import { LIVE_PAGE } from '#app/routes/utils/pageTypes';
import nodeLogger from '#lib/logger.node';
import logResponseTime from '#server/utilities/logResponseTime';
Expand All @@ -11,11 +13,12 @@ import { NON_200_RESPONSE } from '#server/utilities/customMetrics/metrics.const'
import isLitePath from '#app/routes/utils/isLitePath';
import PageDataParams from '#app/models/types/pageDataParams';

import LivePageLayout from './LivePageLayout';
import extractHeaders from '../../../../../src/server/utilities/extractHeaders';
import isValidPageNumber from '../../../../utilities/pageQueryValidator';
import getPageData from '../../../../utilities/pageRequests/getPageData';

const LivePageLayout = dynamic(() => import('./LivePageLayout'));

const logger = nodeLogger(__filename);

export const getServerSideProps: GetServerSideProps = async context => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { GetServerSideProps } from 'next';
import dynamic from 'next/dynamic';
import PageDataParams from '#models/types/pageDataParams';
import { UGC_PAGE } from '#app/routes/utils/pageTypes';
import isLitePath from '#app/routes/utils/isLitePath';
import isAppPath from '#app/routes/utils/isAppPath';
import getPageData from '../../../../utilities/pageRequests/getPageData';
import UGCPageLayout from './UGCPageLayout';
import extractHeaders from '../../../../../src/server/utilities/extractHeaders';

const UGCPageLayout = dynamic(() => import('./UGCPageLayout'));

export const getServerSideProps: GetServerSideProps = async context => {
context.res.setHeader(
'Cache-Control',
Expand Down
Loading

0 comments on commit 49d9ece

Please sign in to comment.