File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1- import  React  from  'react' ; 
1+ import  React ,   {   PropTypes   }  from  'react' ; 
22import  Grid  from  'react-bootstrap/lib/Grid' ; 
33import  Navigation  from  '../utils/Navigation' ; 
44import  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+ 
1626export  default  PageLayout ; 
Original file line number Diff line number Diff line change 11import  React  from  'react' ; 
22import  PageHeader  from  'react-bootstrap/lib/PageHeader' ; 
3+ import  Alert  from  'react-bootstrap/lib/Alert' ; 
34import  Grid  from  'react-bootstrap/lib/Grid' ; 
45import  Row  from  'react-bootstrap/lib/Row' ; 
56import  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  /> 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments