Skip to content

Commit 9e79ce5

Browse files
committed
Update UI
1 parent 8dcb7d6 commit 9e79ce5

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
import React from 'react';
1+
import React, { PropTypes } from 'react';
22
import Grid from 'react-bootstrap/lib/Grid';
33
import Navigation from '../utils/Navigation';
44
import ErrorList from '../utils/ErrorList';
55

6-
const PageLayout = ({ children, ...rest }) => (
6+
let PageLayout = ({ hasGrid, children, ...rest }) => (
77
<div>
88
<Navigation />
99
<ErrorList />
10-
<Grid {...rest}>
11-
{children}
12-
</Grid>
10+
{hasGrid ? (
11+
<Grid {...rest}>
12+
{children}
13+
</Grid>
14+
) : children}
1315
</div>
1416
);
1517

18+
PageLayout.propTypes = {
19+
hasGrid: PropTypes.bool,
20+
};
21+
22+
PageLayout.defaultProps = {
23+
hasGrid: true,
24+
};
25+
1626
export default PageLayout;

src/common/components/pages/user/LoginPage.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import PageHeader from 'react-bootstrap/lib/PageHeader';
3+
import Alert from 'react-bootstrap/lib/Alert';
34
import Grid from 'react-bootstrap/lib/Grid';
45
import Row from 'react-bootstrap/lib/Row';
56
import Col from 'react-bootstrap/lib/Col';
@@ -12,14 +13,24 @@ let LoginPage = ({ location }) => {
1213
let search = next ? '?next=' + next : '';
1314

1415
return (
15-
<PageLayout>
16+
<PageLayout hasGrid={false}>
1617
<Head
1718
links={[
1819
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/5.0.0/bootstrap-social.min.css',
1920
]}
2021
/>
2122
<Grid>
2223
<PageHeader>Login</PageHeader>
24+
<Row>
25+
<Col md={12}>
26+
{next && (
27+
<Alert bsStyle="warning">
28+
<strong>Authentication Required</strong>
29+
{' '}Please login first.
30+
</Alert>
31+
)}
32+
</Col>
33+
</Row>
2334
<Row>
2435
<Col md={9}>
2536
<LoginForm />

0 commit comments

Comments
 (0)