Skip to content

Commit

Permalink
chore(client): do not lazy load PageNotFound
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Dec 14, 2023
1 parent 3f8bba5 commit 281ff04
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useGleanPage } from "./telemetry/glean-context";
import { MainContentContainer } from "./ui/atoms/page-content";
import { Loading } from "./ui/atoms/loading";
import { HydrationData } from "../../libs/types/hydration";
import PageNotFound from "./page-not-found";
import { TopPlacement } from "./ui/organisms/placement";

const About = React.lazy(() => import("./about"));
Expand All @@ -29,7 +30,6 @@ const ContributorSpotlight = React.lazy(
);
const Homepage = React.lazy(() => import("./homepage"));
const Newsletter = React.lazy(() => import("./newsletter"));
const PageNotFound = React.lazy(() => import("./page-not-found"));
const Playground = React.lazy(() => import("./playground"));
const SiteSearch = React.lazy(() => import("./site-search"));

Expand Down
2 changes: 1 addition & 1 deletion client/src/document/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ import { useIncrementFrequentlyViewed } from "../plus/collections/frequently-vie
import { useInteractiveExamplesActionHandler as useInteractiveExamplesTelemetry } from "../telemetry/interactive-examples";
import { BottomBanner, SidePlacement } from "../ui/organisms/placement";
import { BaselineIndicator } from "./baseline-indicator";
import PageNotFound from "../page-not-found";
import { PlayQueue } from "../playground/queue";
// import { useUIStatus } from "../ui-context";

// Lazy sub-components
const MathMLPolyfillMaybe = React.lazy(() => import("./mathml-polyfill"));
const PageNotFound = React.lazy(() => import("../page-not-found"));
const Toolbar = React.lazy(() => import("./toolbar"));

export class HTTPError extends Error {
Expand Down
3 changes: 1 addition & 2 deletions client/src/homepage/static-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { SidebarContainer } from "../../document/organisms/sidebar";
import { TOC } from "../../document/organisms/toc";
import { Toc } from "../../../../libs/types/document";
import { Loading } from "../../ui/atoms/loading";

const PageNotFound = React.lazy(() => import("../../page-not-found"));
import PageNotFound from "../../page-not-found";

interface StaticPageDoc {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion client/src/plus/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import { MainContentContainer } from "../ui/atoms/page-content";
import { MDN_PLUS_TITLE } from "../constants";
import { ArticleActionsContainer } from "../ui/organisms/article-actions-container";
import { DocParent } from "../../../libs/types/document";
import PageNotFound from "../page-not-found";

import "./index.scss";

const AiHelp = React.lazy(() => import("./ai-help"));
const Collections = React.lazy(() => import("./collections"));
const OfferOverview = React.lazy(() => import("./offer-overview"));
const PageNotFound = React.lazy(() => import("../page-not-found"));
const PlusDocs = React.lazy(() => import("./plus-docs"));
const Settings = React.lazy(() => import("../settings"));
const Updates = React.lazy(() => import("./updates"));
Expand Down

0 comments on commit 281ff04

Please sign in to comment.