Skip to content

Commit 0465f37

Browse files
Merge pull request #37 from arcticicestudio/feature/gh-36-root-core-container-component
"Root" core container component (data provider)
2 parents 4fe5473 + 26b91ba commit 0465f37

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
3+
* Copyright (C) 2018-present Sven Greb <[email protected]>
4+
*
5+
* Project: Nord Docs
6+
* Repository: https://github.com/arcticicestudio/nord-docs
7+
* License: MIT
8+
*/
9+
10+
import React, { Fragment } from "react";
11+
import PropTypes from "prop-types";
12+
13+
/**
14+
* The root container.
15+
*
16+
* @author Arctic Ice Studio <[email protected]>
17+
* @author Sven Greb <[email protected]>
18+
* @since 0.1.0
19+
*/
20+
const Root = ({ children }) => <Fragment>{children}</Fragment>;
21+
22+
Root.propTypes = {
23+
children: PropTypes.node.isRequired
24+
};
25+
26+
export default Root;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "./Root";

src/pages/index.jsx

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
3+
* Copyright (C) 2018-present Sven Greb <[email protected]>
4+
*
5+
* Project: Nord Docs
6+
* Repository: https://github.com/arcticicestudio/nord-docs
7+
* License: MIT
8+
*/
9+
import React from "react";
10+
11+
import Root from "containers/core/Root";
12+
13+
/**
14+
* The landing page component representing the root/index of the site.
15+
*
16+
* @author Arctic Ice Studio <[email protected]>
17+
* @author Sven Greb <[email protected]>
18+
* @since 0.1.0
19+
*/
20+
const Landing = () => <Root />;
21+
22+
export default Landing;

0 commit comments

Comments
 (0)