-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from olivertsesk/feature/stylish
Abstract Style to CSS; Fix All Warnings; Remove Dead Code; Cleanup
- Loading branch information
Showing
22 changed files
with
1,458 additions
and
1,275 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,75 @@ | ||
/** | ||
* Created by jaewonlee on 2018. 2. 9.. | ||
*/ | ||
import React, { Component } from 'react'; | ||
import{ | ||
Navbar, | ||
Nav, | ||
NavItem, | ||
Col, | ||
Panel | ||
} from 'react-bootstrap' | ||
import ClassList from './components/adminListing' | ||
|
||
import React, { Component } from 'react'; | ||
import { Col } from 'react-bootstrap'; | ||
import * as firebase from "firebase"; | ||
|
||
class AdminLanding extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
height:window.innerHeight, | ||
width:window.innerWidth, | ||
classes:[] | ||
}; | ||
} | ||
resize = () => { | ||
this.setState({width:window.innerWidth,height:window.innerHeight}) | ||
} | ||
import ClassList from './components/adminListing'; | ||
|
||
class AdminLanding extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
height:window.innerHeight, | ||
width:window.innerWidth, | ||
classes:[] | ||
}; | ||
} | ||
|
||
resize = () => { | ||
this.setState({width: window.innerWidth, height: window.innerHeight}); | ||
} | ||
|
||
componentDidMount() { | ||
window.addEventListener('resize', this.resize); | ||
firebase.database().ref('/classes/').on('value',(snapshot) =>{ | ||
var classes =[]; | ||
|
||
snapshot.forEach(function(item) { | ||
classes.push(item); | ||
}); | ||
|
||
this.setState({classes}); | ||
}) | ||
} | ||
|
||
componentWillUnmount() { | ||
window.removeEventListener('resize', this.resize); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className="landingPage" style={{height:this.state.height-100}}> | ||
<Col lg={8} md={8} sm={8} xs={12} className="landingPageHalfCol"> | ||
<div className="classListWrapper scroll"> | ||
{ | ||
this.state.classes.map((item,i)=>{ | ||
return( | ||
<ClassList item ={item}/> | ||
) | ||
}) | ||
} | ||
</div> | ||
</Col> | ||
|
||
componentDidMount() { | ||
window.addEventListener('resize', this.resize) | ||
firebase.database().ref('/classes/').on('value',(snapshot) =>{ | ||
var classes =[]; | ||
snapshot.forEach(function(item) { | ||
classes.push(item); | ||
}); | ||
this.setState({classes}) | ||
console.log(classes) | ||
}) | ||
} | ||
<Col lg={4} md={4} sm={4} xs={12} className="landingPageHalfCol"> | ||
<div className="center rightSideWrapper" style={{width:(this.state.width-160)*1/3-90}}> | ||
<div className="center rightSideButton"> | ||
<p>Manage Professors</p> | ||
</div> | ||
|
||
componentWillUnmount() { | ||
window.removeEventListener('resize', this.resize) | ||
} | ||
<br className="rightSideSpacer"/> | ||
|
||
render() { | ||
return ( | ||
<div style={{width:'100%',height:this.state.height-65,padding:80}}> | ||
<Col lg={8} md={8} sm={8} xs={12} style={{height:'100%',padding:0,background:'white',overflowY:"scroll"}}> | ||
{ | ||
this.state.classes.map((item,i)=>{ | ||
return( | ||
<ClassList item ={item}/> | ||
) | ||
}) | ||
} | ||
</Col> | ||
<Col lg={4} md={4} sm={4} xs={12} style={{height:'100%',padding:0}}> | ||
<div className="center" style={{flexDirection:'column',height:"100%",width:(this.state.width-160)*1/3-90,marginLeft:80,}}> | ||
<div className="center" style={{flexDirection:'column',height:"50%",width:'90%',borderColor:'#343f4b',borderRadius:10,border:'solid',background:'white'}}> | ||
<p style={{fontSize:30}}>Search</p> | ||
</div> | ||
<br style={{height:"10%",width:'90%'}}/> | ||
<div className="center" style={{flexDirection:'column',height:"50%",width:'90%',borderColor:'#343f4b',borderRadius:10,border:'solid',background:'white'}}> | ||
<p style={{fontSize:30}}>See Professor's</p> | ||
<p style={{fontSize:30}}>Other Courses</p> | ||
</div> | ||
</div> | ||
</Col> | ||
</div> | ||
); | ||
} | ||
} | ||
<div className="center rightSideButton"> | ||
<p>Manage Classes</p> | ||
</div> | ||
</div> | ||
</Col> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default AdminLanding; |
Oops, something went wrong.