Skip to content

Commit

Permalink
added ds_store to gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
justiceotuya committed May 13, 2019
1 parent 2cfa498 commit 8c6102b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build/Release
node_modules/
jspm_packages/
package-lock.json

.DS_Store
# TypeScript v1 declaration files
typings/

Expand Down
59 changes: 59 additions & 0 deletions components/Layout/components/PageLayout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* eslint-disable react/require-default-props */
import React from 'react';
import { Layout } from 'antd';
import PropTypes from 'prop-types';
import NavHeader from './NavHeader';
import Sidebar from './Sidebar';
import PageFooter from './PageFooter';
import './PageLayout.css';

const { Content } = Layout;

/**
* Function for displaying the landing page
*
* @function
* @param {Function} title controls the title of the page
* @param {Function} isAuthenticated controls if user is authrnticated or not
* @param {Function} children other pages who are children of this layout
* @param {Function} footerPresent displays footer if true
* @param {Function} siderIsPresent displays side for mobile pages
* @return {Object} controlvhe over all layout of the webpage
*/
export default function PageLayout(props) {
const {
title,
isAuthenticated,
children,
footerPresent,
siderIsPresent,
} = props;

return (
<>
<Layout className="LandingPage_layout">
<NavHeader
title={title || 'Helpme | Connect with Friends'}
isAuthenticated={isAuthenticated}
/>
<Content className="PageLayout_body">
<Layout hasSider>
<Sidebar siderIsPresent={siderIsPresent} />
<Content className="PageLayout_content">
{children}
</Content>
</Layout>
</Content>
</Layout>
{footerPresent ? <PageFooter /> : null}
</>
);
}

PageLayout.propTypes = {
children: PropTypes.node,
footerPresent: PropTypes.bool,
isAuthenticated: PropTypes.bool,
siderIsPresent: PropTypes.bool,
title: PropTypes.string,
};

0 comments on commit 8c6102b

Please sign in to comment.