Skip to content

Commit 81a9175

Browse files
authored
Merge pull request #2028 from immutable-js/doc-missing-layout
2 parents 140103c + b9b01b7 commit 81a9175

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { DocHeader } from '../../../DocHeader';
2+
import { ImmutableConsole } from '../../../ImmutableConsole';
3+
import { getVersions } from '../../../static/getVersions';
4+
import { getVersionFromParams } from '../../getVersionFromParams';
5+
6+
export default function VersionLayout({
7+
children,
8+
params,
9+
}: {
10+
children: React.ReactNode;
11+
params: { version: string };
12+
}) {
13+
const versions = getVersions();
14+
15+
const version = getVersionFromParams(params);
16+
17+
return (
18+
<div>
19+
<ImmutableConsole version={version} />
20+
<DocHeader versions={versions} currentVersion={version} />
21+
<div className="pageBody">
22+
<div className="contents">{children}</div>
23+
</div>
24+
</div>
25+
);
26+
}

0 commit comments

Comments
 (0)