Skip to content

Commit

Permalink
wip(scrim-inline): fix react suspense error
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed Sep 23, 2024
1 parent bb5ddf5 commit 4f4cd9d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/src/curriculum/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "./index.scss";
import "./landing.scss";
import { ProseSection } from "../../../libs/types/document";
import { PartnerBanner } from "./partner-banner";
import { useIsServer } from "../hooks";

const ScrimInline = lazy(() => import("./scrim-inline"));

Expand Down Expand Up @@ -130,6 +131,8 @@ const SCRIM_URL = "https://v2.scrimba.com/s06icdv?via=mdn";
function About({ section }) {
const { title, content, id } = section.value;
const html = useMemo(() => ({ __html: content }), [content]);
const isServer = useIsServer();

return (
<section key={id} className="landing-about-container">
<div className="landing-about">
Expand All @@ -138,9 +141,7 @@ function About({ section }) {
<div className="arrow"></div>
<section className="scrim-wrapper">
<div className="scrim-border">
<Suspense fallback={<scrim-inline />}>
<ScrimInline url={SCRIM_URL} />
</Suspense>
<Suspense>{!isServer && <ScrimInline url={SCRIM_URL} />}</Suspense>
</div>
<p>
Learn our curriculum with high quality, interactive courses from our
Expand Down

0 comments on commit 4f4cd9d

Please sign in to comment.