Skip to content

Commit 59be002

Browse files
committed
removed white space + formatting alignment
1 parent 7640320 commit 59be002

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

frontend/src/components/pages/Content.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React from 'react';
22
import { useParams } from 'react-router-dom';
33

44
export function Content() {
5-
const { courseID } = useParams();
6-
const { contentID } = useParams();
5+
const { courseID } = useParams();
6+
const { contentID } = useParams();
77

88
return (
99
<div className="p-6">

frontend/src/components/pages/Course.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React, { useEffect, useState } from 'react';
22
import { useParams } from 'react-router-dom';
33

44
export function Course() {
5-
const { courseID } = useParams();
5+
const { courseID } = useParams();
66
const [courseInfo, setCourseInfo] = useState(null);
7-
const [error, setError] = useState(null);
7+
const [error, setError] = useState(null);
88

99
useEffect(() => {
1010
fetch(`http://localhost:4000/course/${courseID}`)
@@ -45,6 +45,7 @@ export function Course() {
4545
</div>
4646
);
4747
});
48+
4849
return (
4950
<div className="p-6">
5051
<h1 className="text-2xl font-bold mb-4">{courseInfo.title}</h1>

frontend/src/components/pages/CourseDashboard.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Cookies from 'js-cookie';
33

44
export function CourseDashboard() {
55
const [courseInfo, setCourseInfo] = useState(null);
6-
const [error, setError] = useState(null);
6+
const [error, setError] = useState(null);
77

88
useEffect(() => {
99
const userId = Cookies.get('userId');
@@ -26,16 +26,16 @@ export function CourseDashboard() {
2626

2727
if (error) return <p>Error: {error}</p>;
2828
if (!courseInfo) return <p>Loading...</p>;
29-
29+
3030
var courseList = [];
3131
//Push all courses into courseList
3232
courseInfo.forEach(course => {
3333
courseList.push(
3434
<a href={`/courses/${course.ID}`}>
35-
<div className="bg-gray-100 p-4 rounded shadow hover:bg-gray-300" >
36-
<h3 className="text-xl font-semibold" >{course.title}</h3>
37-
<p className="mt-2">{course.description}</p>
38-
</div>
35+
<div className="bg-gray-100 p-4 rounded shadow hover:bg-gray-300" >
36+
<h3 className="text-xl font-semibold" >{course.title}</h3>
37+
<p className="mt-2">{course.description}</p>
38+
</div>
3939
</a>
4040
)
4141
});

0 commit comments

Comments
 (0)