Skip to content

Commit 950edab

Browse files
authored
Merge pull request #90 from usingbrain/main
pulling style changes
2 parents 404351e + b6eda65 commit 950edab

4 files changed

Lines changed: 27 additions & 31 deletions

File tree

client/src/Components/Calendar/StudentHistory.tsx

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import moment from 'moment';
88
const StudentHistory: React.FC = () => {
99
const courseId = Number(useParams().courseId);
1010
const studentId = Number(useParams().studentId);
11+
const name = 'Friend';
12+
const lastname = 'buddy';
13+
1114
const [{ fetching, data, error }] = useIndividualAttendanceQuery({
1215
variables: { courseId, studentId },
1316
});
@@ -21,22 +24,27 @@ const StudentHistory: React.FC = () => {
2124

2225
if (indivHistory) {
2326
return (
24-
<div className=" flex flex-row flex-wrap w-5/6 justify-start ">
25-
{indivHistory.map((session) => {
26-
const date = new Date(Number(session!.date));
27-
const UTCdate = date.toUTCString();
27+
<div>
28+
<h1 className="flex justify-center text-lg md:text-xl">{name} {lastname}</h1>
29+
<section className="flex justify-center h-1/4 md:h-1/2 lg:h-5/6 xl:h-screen p-4">
30+
<div className=" flex flex-row flex-wrap justify-start bg-white w-11/12 md:h-2/3 lx:w-9/12 overflow-scroll border-green border-8">
31+
{indivHistory.map((session) => {
32+
const date = new Date(Number(session!.date));
33+
const UTCdate = date.toUTCString();
2834

29-
return (
30-
<div className="flex flex-col justify-center p-4 items-center">
31-
{session!.attended ? (
32-
<CheckBoxChecked className="w-10 h-10" />
33-
) : (
34-
<CheckBoxCrossed className="w-10 h-10" />
35-
)}
36-
<p>{moment(UTCdate).format('L')}</p>
37-
</div>
38-
);
39-
})}
35+
return (
36+
<div className="flex flex-col justify-center w-26 p-2 md:w-32 items-center border-2 border-black m-1 hover:bg-green-xlight">
37+
{session!.attended ? (
38+
<CheckBoxChecked className="w-10 h-10" />
39+
) : (
40+
<CheckBoxCrossed className="w-10 h-10" />
41+
)}
42+
<p>{moment(UTCdate).format('L')}</p>
43+
</div>
44+
);
45+
})}
46+
</div>
47+
</section>
4048
</div>
4149
);
4250
}

client/src/Components/ClassView/StudentElementHistory.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ const StudentElementHistory: React.FC<Props> = ({
1717
const navigate = useNavigate();
1818

1919
return (
20-
<div
20+
<button
2121
className="flex place-items-center h-10"
2222
onClick={() =>
2323
navigate(`/homepage/classes/${courseId}/student/${studentId}`)
2424
}
2525
>
2626
<h3 className="mx-4">{lastname} {name}</h3>
27-
</div>
27+
</button>
2828
);
2929
};
3030

client/src/Components/ClassView/StudentsList.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import React, { useEffect } from 'react';
22
import { useSelector, useDispatch } from 'react-redux';
33
import { setCurrentList } from '../../store/actions';
44
import { useAssignedStudentsQuery, User } from '../../generated/graphql';
5-
import Lottie from 'react-lottie';
6-
import loadingAnimation from '../../Assets/loadinganimation.json';
75
import StudentElement from './StudentElement';
86
import Session from '../../Types/session';
97
import socketIOClient from 'socket.io-client';
@@ -41,17 +39,7 @@ const StudentsList: React.FC<{ courseId: number }> = ({ courseId }) => {
4139
socket.on('ASSIGNMENT_CHANGE', () => refetchAssigned());
4240
}, []);
4341

44-
const loadingAnimationOptions = {
45-
loop: true,
46-
autoplay: true,
47-
animationData: loadingAnimation,
48-
rendererSettings: {},
49-
};
50-
51-
if (fetching)
52-
return (
53-
<Lottie options={loadingAnimationOptions} height={400} width={'100%'} />
54-
);
42+
if (fetching) { };
5543

5644
if (error) return <h2>Oops something went wrong try again</h2>;
5745

client/src/Components/TeacherHomepage/Homepage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Homepage: React.FC = () => {
2929
return (
3030
<div>
3131
<Navbar />
32-
<main className="flex flex-row justify-start w-full">
32+
<main className="flex flex-row justify-start w-full h-screen">
3333
<Sidemenu />
3434
{selectedCourse ? <Outlet /> : <MainTeacherView />}
3535
</main>

0 commit comments

Comments
 (0)