on ea38184 help sign in
urbit.org/components/BasicPage.js
36 lines 973 B history raw
1import { useRouter } from "next/router";
2import Head from "next/head";
3import Meta from "../components/Meta";
4import ErrorPage from "../pages/404";
5import Container from "./Container";
6import Header from "./Header";
7import Footer from "./Footer";
8import SingleColumn from "./SingleColumn";
9import Section from "./Section";
10import { decode } from "html-entities";
11import Markdown from "./Markdown";
13export default function BasicPage({ post, search }) {
14 const router = useRouter();
15 if (!router.isFallback && !post?.slug) {
16 return <ErrorPage />;
17 }
18 return (
19 <Container>
20 <Head>
21 <title>Urbit • {post.title}</title>
22 {Meta(post)}
23 </Head>
24 <SingleColumn>
25 <Header search={search} />
26 <Section narrow>
27 <h1>{post.title}</h1>
28 </Section>
29 <Section narrow className="markdown">
30 <Markdown post={post} />
31 </Section>
32 </SingleColumn>
33 <Footer />
34 </Container>
35 );