File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,14 +4,21 @@ import SessionBtn from './SessionBtn';
44import RegisterBtn from './RegisterBtn' ;
55
66const viewStyle =
7- 'flex flex-col justify-start items-left content-center pt-4 w-1/2 pl-4 h-full' ;
7+ 'flex flex-row justify-between items-left content-center pt-4 w-full px-8 h-full' ;
8+ const listStyle = "rounded-sm shadow-xl w-1/2" ;
9+ const listHeader = "bg-green p-2 text-white text-bold text-lg rounded-t-sm" ;
810
911const ClassDashboard : React . FC < { courseId : number } > = ( { courseId } ) => {
1012 return (
1113 < div className = { viewStyle } >
12- < RegisterBtn courseId = { courseId } />
13- < SessionBtn courseId = { courseId } />
14- < StudentsList courseId = { courseId } />
14+ < section className = { listStyle } >
15+ < div className = { listHeader } > Students</ div >
16+ < StudentsList courseId = { courseId } />
17+ </ section >
18+ < article >
19+ < SessionBtn courseId = { courseId } />
20+ < RegisterBtn courseId = { courseId } />
21+ </ article >
1522 { /* TODO: add DELETE COURSE BUTTON */ }
1623 </ div >
1724 ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Overview from '../Calendar/Overview';
99
1010const headerStyle =
1111 'bg-black text-white flex flex-row justify-between items-center content-center p-8 h-20 mb-4 text-3xl' ;
12+ const attendanceStyle = 'flex justify-center bg-black hover:bg-green-light py-4 rounded-sm font-bold text-lg mb-4 w-1/3 m-auto text-white' ;
1213
1314const ClassView : React . FC = ( ) => {
1415 const dispatch = useDispatch ( ) ;
@@ -33,17 +34,17 @@ const ClassView: React.FC = () => {
3334 </ button >
3435 </ Link >
3536 </ div >
36- < div >
37- < Link to = { link } >
37+ < article className = "" >
38+ { history ? < Outlet /> : < ClassDashboard courseId = { courseId } /> }
39+ < Link to = { link } className = { attendanceStyle } >
3840 < h3
3941 className = "text-lg"
4042 onClick = { ( ) => dispatch ( setHistory ( history ) ) }
4143 >
42- { history ? 'back to dashboard' : 'attendance history' }
44+ { history ? 'Back to dashboard' : 'Attendance history' }
4345 </ h3 >
4446 </ Link >
45- { history ? < Outlet /> : < ClassDashboard courseId = { courseId } /> }
46- </ div >
47+ </ article >
4748 </ section >
4849 ) ;
4950 }
Original file line number Diff line number Diff line change 11import React from 'react' ;
22
3+ const registerStyle = 'flex justify-center bg-green hover:bg-green-light py-4 rounded-sm font-bold text-lg mb-8 text-white h-16 w-full' ;
4+
35const RegisterBtn : React . FC < { courseId : number } > = ( { courseId } ) => {
46 function openQR ( ) {
57 window . open (
@@ -9,7 +11,7 @@ const RegisterBtn: React.FC<{ courseId: number }> = ({ courseId }) => {
911 ) ;
1012 }
1113
12- return < button onClick = { openQR } > REGISTER BUTTON </ button > ;
14+ return < button onClick = { openQR } className = { registerStyle } > Register students </ button > ;
1315} ;
1416
1517export default RegisterBtn ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { setSession } from '../../store/actions';
88import Session from '../../Types/session' ;
99
1010const sessionBtnStyle =
11- 'bg-green hover:bg-green-light py-4 px-8 rounded font-bold text-lg mb-4' ;
11+ 'flex justify-center bg-green hover:bg-green-light py-4 rounded-sm font-bold text-lg mb-4 h-16 ' ;
1212const btnTextStyle = 'font-bold text-lg text-white' ;
1313
1414const SessionBtn : React . FC < { courseId : number } > = ( { courseId } ) => {
Original file line number Diff line number Diff line change @@ -76,13 +76,13 @@ const AddForm: React.FC = () => {
7676 </ div >
7777 < form onSubmit = { ( e ) => handleSubmit ( e ) } className = "flex flex-row items-center w-full shadow-xl" >
7878 < input
79- className = "h-14 w-full sm:w-full text-black"
79+ className = "h-14 w-full sm:w-full text-black rounded-l-sm "
8080 type = "text"
8181 value = { title }
8282 placeholder = "Input class title."
8383 onChange = { ( e ) => setTitle ( e . target . value ) }
8484 />
85- < button type = "submit" className = "bg-green text-white text-lg lg:text-2xl sm:text-xl w-4/12 lg:w-2/12 h-14" > Add</ button >
85+ < button type = "submit" className = "bg-green text-white text-lg lg:text-2xl sm:text-xl w-4/12 lg:w-2/12 h-14 rounded-r-sm " > Add</ button >
8686 </ form >
8787 </ article >
8888 </ section >
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { useDispatch } from 'react-redux';
33import { setHistory , setSelected } from '../../store/actions' ;
44import CourseType from '../../Types/course' ;
55
6- let courseStyle = 'flex py-2 font-light text-left text-white w-full hover:bg-green-light justify-center' ;
6+ let courseStyle = 'flex flex-col py-2 font-light text-left text-white w-full hover:bg-green-light justify-center' ;
77
88const Course : React . FC < { course : CourseType } > = ( { course } ) => {
99 const dispatch = useDispatch ( ) ;
@@ -15,7 +15,8 @@ const Course: React.FC<{ course: CourseType }> = ({ course }) => {
1515 } ;
1616 return (
1717 < div className = { courseStyle } onClick = { handleClick } >
18- < p className = "flex justify-center border-b-2 w-1/4 pb-4" > { course . name } </ p >
18+ < p className = "flex justify-center pb-4" > { course . name } </ p >
19+ < hr className = "border-b-1 border-white w-1/4 m-auto" > </ hr >
1920 </ div >
2021 ) ;
2122} ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const Navbar: React.FC<{ user: User }> = ({ user }) => {
2020 return (
2121 < nav className = { navStyle } >
2222 < Link to = '/' >
23- < QRLogo className = 'w-2/3 lg:w-1/4 flex' />
23+ < QRLogo className = 'w-1/2 lg:w-2/3 flex' />
2424 </ Link >
2525 < section className = 'flex flex-row items-center' >
2626 < h3 className = 'pr-8 font-lato font-bold text-lg' >
You can’t perform that action at this time.
0 commit comments