mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 23:05:23 +00:00
Co-authored-by: Dan Abramov <dan.abramov@me.com> Co-authored-by: Sylwia Vargas <sylwia.vargas@gmail.com> Co-authored-by: Dan Lebowitz <dan.lebo@me.com> Co-authored-by: Razvan Gradinar <grazvan@fb.com> Co-authored-by: Jared Palmer <jared@palmer.net> Co-authored-by: Dane Grant <danecando@gmail.com> Co-authored-by: Dustin Goodman <dustin.s.goodman@gmail.com> Co-authored-by: Rick Hanlon <rickhanlonii@gmail.com> Co-authored-by: Maggie Appleton <maggie.fm.appleton@gmail.com> Co-authored-by: Alex Moldovan <alex.n.moldovan@gmail.com> Co-authored-by: Ives van Hoorne <ives.v.h@gmail.com> Co-authored-by: Brian Vaughn <bvaughn@fb.com> Co-authored-by: Dmitri Pavlutin <dpavlutin@gmail.com>
25 lines
704 B
TypeScript
25 lines
704 B
TypeScript
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*/
|
|
|
|
import * as React from 'react';
|
|
import {MarkdownPage, MarkdownProps} from './MarkdownPage';
|
|
import {RouteItem} from 'components/Layout/useRouteMeta';
|
|
import {Page} from './Page';
|
|
import sidebarLearn from '../../sidebarLearn.json';
|
|
interface PageFrontmatter {
|
|
title: string;
|
|
}
|
|
|
|
export default function withLearn(meta: PageFrontmatter) {
|
|
function LayoutLearn(props: MarkdownProps<PageFrontmatter>) {
|
|
return <MarkdownPage {...props} meta={meta} />;
|
|
}
|
|
LayoutLearn.appShell = AppShell;
|
|
return LayoutLearn;
|
|
}
|
|
|
|
function AppShell(props: {children: React.ReactNode}) {
|
|
return <Page {...props} routeTree={sidebarLearn as RouteItem} />;
|
|
}
|