Skip to content

Commit 7b30036

Browse files
authored
fix: various fixes when using yari in fred (#13142)
use "real" links to articles in collections import all screenshots used in plus overview page hide offline settings if FRED is set
1 parent 8e624f0 commit 7b30036

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

client/src/env.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,5 @@ export function survey_rates(surveyKey: string): {
135135
export const OBSERVATORY_API_URL =
136136
process.env.REACT_APP_OBSERVATORY_API_URL ||
137137
"https://observatory-api.mdn.allizom.net";
138+
139+
export const FRED = JSON.parse(process.env.REACT_APP_FRED || "false");

client/src/plus/collections/collection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function ItemComponent({
238238
>
239239
<header>
240240
<h2>
241-
<Link to={item.url}>{camelWrap(item.title)}</Link>
241+
<a href={item.url}>{camelWrap(item.title)}</a>
242242
</h2>
243243
<ArticleActions
244244
doc={doc}

client/src/plus/offer-overview/offer-overview-feature/index.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { Button } from "../../../ui/atoms/button";
22
import "./index.scss";
33
import screenshotAiHelp from "../../../../public/assets/ai-help/ai-help_light.png";
4+
import screenshotAdFree from "../../../../public/assets/afree.png";
5+
import screenshotUpdates from "../../../../public/assets/updates.png";
6+
import screenshotCollections from "../../../../public/assets/collections.png";
7+
import screenshotPlayground from "../../../../public/assets/playground.png";
48

59
function OfferOverviewFeature({ id, img, imgAlt, children }) {
610
return (
@@ -24,7 +28,7 @@ function OfferOverviewFeature({ id, img, imgAlt, children }) {
2428
export default function OfferOverviewFeatures() {
2529
return (
2630
<section id="features">
27-
<OfferOverviewFeature id="afree" img="/assets/afree.png" imgAlt="">
31+
<OfferOverviewFeature id="afree" img={screenshotAdFree} imgAlt="">
2832
<section aria-labelledby="afree-section-title">
2933
<h2 id="afree-section-title">Go ads free</h2>
3034
<h3>Enjoy MDN ads-free with an MDN Plus subscription.</h3>
@@ -55,7 +59,7 @@ export default function OfferOverviewFeatures() {
5559
</OfferOverviewFeature>
5660
<OfferOverviewFeature
5761
id="playground"
58-
img="/assets/playground.png"
62+
img={screenshotPlayground}
5963
imgAlt=""
6064
>
6165
<section aria-labelledby="playground-section-title">
@@ -71,7 +75,7 @@ export default function OfferOverviewFeatures() {
7175
</Button>
7276
</section>
7377
</OfferOverviewFeature>
74-
<OfferOverviewFeature id="updates" img="/assets/updates.png" imgAlt="">
78+
<OfferOverviewFeature id="updates" img={screenshotUpdates} imgAlt="">
7579
<section aria-labelledby="updates-section-title">
7680
<h2 id="updates-section-title">Updates</h2>
7781
<h3>
@@ -92,7 +96,7 @@ export default function OfferOverviewFeatures() {
9296
</OfferOverviewFeature>
9397
<OfferOverviewFeature
9498
id="collections"
95-
img="/assets/collections.png"
99+
img={screenshotCollections}
96100
imgAlt=""
97101
>
98102
<section aria-labelledby="collections-section-title">

client/src/settings/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { NEWSLETTER_ENABLED } from "../env";
2+
import { FRED, NEWSLETTER_ENABLED } from "../env";
33

44
import { OfflineStatusBar } from "../ui/molecules/offline-status-bar";
55

@@ -22,7 +22,7 @@ export function Settings() {
2222
<Manage />
2323
<ManageAIHelp />
2424
{NEWSLETTER_ENABLED && <Newsletter />}
25-
<OfflineSettings />
25+
{!FRED && <OfflineSettings />}
2626
</article>
2727
</>
2828
);

0 commit comments

Comments
 (0)