Skip to content

Commit

Permalink
Remove isWeb check
Browse files Browse the repository at this point in the history
Articles with discussion are still filtered out in MAPI, but we will
begin supporting them in Beta soon.

Closes #10416
  • Loading branch information
georgeblahblah committed Jan 31, 2024
1 parent 3249401 commit 7966f99
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions dotcom-rendering/src/layouts/CommentLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ export const CommentLayout = (props: WebProps | AppsProps) => {
// 1) Read 'forceEpic' value from URL parameter and use it to force the slot to render
// 2) Otherwise, ensure slot only renders if `article.config.shouldHideReaderRevenue` equals false.

/** Mobile articles with comments should be filtered in MAPI but we leave this in for clarity **/
const showComments = isWeb && article.isCommentable && !isPaidContent;
const showComments = article.isCommentable && !isPaidContent;

const avatarUrl = getSoleContributor(article.tags, article.byline)
?.bylineLargeImageUrl;
Expand Down
3 changes: 1 addition & 2 deletions dotcom-rendering/src/layouts/ImmersiveLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@ export const ImmersiveLayout = (props: WebProps | AppProps) => {
// 1) Read 'forceEpic' value from URL parameter and use it to force the slot to render
// 2) Otherwise, ensure slot only renders if `article.config.shouldHideReaderRevenue` equals false.

/** Mobile articles with comments should be filtered in MAPI but we leave this in for clarity **/
const showComments = isWeb && article.isCommentable && !isPaidContent;
const showComments = article.isCommentable && !isPaidContent;

const mainMedia = article.mainMediaElements[0];

Expand Down
3 changes: 1 addition & 2 deletions dotcom-rendering/src/layouts/InteractiveLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ export const InteractiveLayout = (props: WebProps | AppsProps) => {
const isApps = renderingTarget === 'Apps';
const isWeb = renderingTarget === 'Web';

/** Mobile articles with comments should be filtered in MAPI but we leave this in for clarity **/
const showComments = isWeb && article.isCommentable && !isPaidContent;
const showComments = article.isCommentable && !isPaidContent;

const { branding } = article.commercialProperties[article.editionId];

Expand Down
3 changes: 1 addition & 2 deletions dotcom-rendering/src/layouts/LiveLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ export const LiveLayout = (props: WebProps | AppsProps) => {
const isWeb = renderingTarget === 'Web';
const isApps = renderingTarget === 'Apps';

/** Mobile articles with comments should be filtered in MAPI but we leave this in for clarity **/
const showComments = isWeb && article.isCommentable && !isPaidContent;
const showComments = article.isCommentable && !isPaidContent;

return (
<>
Expand Down
3 changes: 1 addition & 2 deletions dotcom-rendering/src/layouts/PictureLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ export const PictureLayout = (props: WebProps | AppsProps) => {
// 1) Read 'forceEpic' value from URL parameter and use it to force the slot to render
// 2) Otherwise, ensure slot only renders if `article.config.shouldHideReaderRevenue` equals false.

/** Mobile articles with comments should be filtered in MAPI but we leave this in for clarity **/
const showComments = isWeb && article.isCommentable && !isPaidContent;
const showComments = article.isCommentable && !isPaidContent;

const { branding } = article.commercialProperties[article.editionId];

Expand Down
3 changes: 1 addition & 2 deletions dotcom-rendering/src/layouts/ShowcaseLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ export const ShowcaseLayout = (props: WebProps | AppsProps) => {
// 1) Read 'forceEpic' value from URL parameter and use it to force the slot to render
// 2) Otherwise, ensure slot only renders if `article.config.shouldHideReaderRevenue` equals false.

/** Mobile articles with comments should be filtered in MAPI but we leave this in for clarity **/
const showComments = isWeb && article.isCommentable && !isPaidContent;
const showComments = article.isCommentable && !isPaidContent;

const { branding } = article.commercialProperties[article.editionId];

Expand Down
3 changes: 1 addition & 2 deletions dotcom-rendering/src/layouts/StandardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ export const StandardLayout = (props: WebProps | AppProps) => {
const isMatchReport =
format.design === ArticleDesign.MatchReport && !!footballMatchUrl;

/** Mobile articles with comments should be filtered in MAPI but we leave this in for clarity **/
const showComments = isWeb && article.isCommentable && !isPaidContent;
const showComments = article.isCommentable && !isPaidContent;

const { branding } = article.commercialProperties[article.editionId];

Expand Down

0 comments on commit 7966f99

Please sign in to comment.