Skip to content

Commit

Permalink
Update UI
Browse files Browse the repository at this point in the history
  • Loading branch information
gocreating committed Oct 24, 2016
1 parent 8dcb7d6 commit 9e79ce5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
20 changes: 15 additions & 5 deletions src/common/components/layouts/PageLayout.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
import React from 'react';
import React, { PropTypes } from 'react';
import Grid from 'react-bootstrap/lib/Grid';
import Navigation from '../utils/Navigation';
import ErrorList from '../utils/ErrorList';

const PageLayout = ({ children, ...rest }) => (
let PageLayout = ({ hasGrid, children, ...rest }) => (
<div>
<Navigation />
<ErrorList />
<Grid {...rest}>
{children}
</Grid>
{hasGrid ? (
<Grid {...rest}>
{children}
</Grid>
) : children}
</div>
);

PageLayout.propTypes = {
hasGrid: PropTypes.bool,
};

PageLayout.defaultProps = {
hasGrid: true,
};

export default PageLayout;
13 changes: 12 additions & 1 deletion src/common/components/pages/user/LoginPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import PageHeader from 'react-bootstrap/lib/PageHeader';
import Alert from 'react-bootstrap/lib/Alert';
import Grid from 'react-bootstrap/lib/Grid';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';
Expand All @@ -12,14 +13,24 @@ let LoginPage = ({ location }) => {
let search = next ? '?next=' + next : '';

return (
<PageLayout>
<PageLayout hasGrid={false}>
<Head
links={[
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/5.0.0/bootstrap-social.min.css',
]}
/>
<Grid>
<PageHeader>Login</PageHeader>
<Row>
<Col md={12}>
{next && (
<Alert bsStyle="warning">
<strong>Authentication Required</strong>
{' '}Please login first.
</Alert>
)}
</Col>
</Row>
<Row>
<Col md={9}>
<LoginForm />
Expand Down

0 comments on commit 9e79ce5

Please sign in to comment.