Skip to content

Commit 5a32bc5

Browse files
committed
export UnderConstruction from mdx instead of its own file
1 parent 2796abc commit 5a32bc5

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

mdx/projects/lagrangian-particle-tracking.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ tags: ["research"]
66
description: "My research on Lagrangian particle tracking in the Northern California Current System."
77
---
88

9-
// import { UnderConstruction } from "~/components/UnderConstruction.tsx";
9+
import { UnderConstruction } from "~/components/mdx.tsx";
1010

1111
<UnderConstruction />

mdx/projects/pollen-data.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ description: "A historical time series of pollen data from the Willamette Valley
99
// import { TimeSeriesPlot } from "@/components/ui/Plots";
1010

1111
// import { UnderConstruction } from "~/components/UnderConstruction.tsx";
12+
import { UnderConstruction } from "~/components/mdx.tsx";
1213

1314
<UnderConstruction />

mdx/projects/shelf-nitrate-response-to-upwelling.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ description: "My research on the response of shelf nitrate to upwelling in the N
77
---
88

99
// import { UnderConstruction } from "~/components/UnderConstruction.tsx";
10+
import { UnderConstruction } from "~/components/mdx.tsx";
1011

1112
<UnderConstruction />

src/components/mdx.tsx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Link, useMatch } from "@tanstack/react-router";
77
import { ReactNode, useState, useRef, useMemo } from "react";
88
import { Copy, Check, ExternalLink } from "lucide-react";
99
import { getMDXComponent } from "mdx-bundler/client";
10-
import UnderConstruction from "./UnderConstruction";
1110

1211
function Paragraph({ children }: { children: ReactNode }) {
1312
return (
@@ -207,6 +206,27 @@ function Image({ src, alt }: { src: string; alt: string }) {
207206
);
208207
}
209208

209+
export function UnderConstruction({ description }: { description?: string }) {
210+
return (
211+
<div className="min-h-screen flex flex-col items-center justify-start p-16 text-center font-sans">
212+
<div>
213+
<h1 className="text-4xl mt-8">🚧 Under Construction 🚧</h1>
214+
215+
{description && (
216+
<p className="text-xl text-gray-600 max-w-xl">{description}</p>
217+
)}
218+
219+
<p className="mt-8 max-w-md">
220+
I recently{" "}
221+
<FancyLink href="/about-site">rewrote this website</FancyLink> and
222+
I&apos;m working on writing up a whole bunch of content. Check back
223+
soon!
224+
</p>
225+
</div>
226+
</div>
227+
);
228+
}
229+
210230
export function MDX({ code }: { code: string }) {
211231
const Component = useMemo(() => getMDXComponent(code), [code]);
212232
return (
@@ -223,9 +243,6 @@ export function MDX({ code }: { code: string }) {
223243
p: Paragraph,
224244
Image,
225245
blockquote: BlockQuote,
226-
UnderConstruction() {
227-
return <UnderConstruction />;
228-
},
229246
}}
230247
/>
231248
);

0 commit comments

Comments
 (0)