Skip to content

Commit

Permalink
fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
TeaByte committed Jan 8, 2024
1 parent c5abf8e commit cdd7c29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
20 changes: 2 additions & 18 deletions components/CourseCard.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
import { Course } from "../utils/types.ts";

import IconCircle from "https://deno.land/x/[email protected]/tsx/circle.tsx";
import IconcircleCheck from "https://deno.land/x/[email protected]/tsx/circle-check.tsx";

// import IconcircleCheck from "https://deno.land/x/[email protected]/tsx/circle-check.tsx";

export default function CourseCard(props: { course: Course }) {

// FOR TESTING PURPOSES ONLY
// add comments course to the local storage
// localStorage.setItem("completedCourses", JSON.stringify(["comments"]));

// check if the student has completed the course from the local storage
const completedCourses = localStorage.getItem("completedCourses");
const completedCoursesArray = completedCourses
? JSON.parse(completedCourses)
: [];
const isCompleted = completedCoursesArray.includes(props.course.slug);
const { course } = props;
return (
<div
Expand All @@ -24,11 +12,7 @@ export default function CourseCard(props: { course: Course }) {
>
<a title={course.title} href={`/${course.slug}`}>
<h3 class="text-gray-500 font-bold flex gap-1 items-center">
{/* <IconCircle aria-hidden="true" class="h-4 w-4" /> {course.title} */}
{

isCompleted ? <IconcircleCheck aria-hidden="true" class="h-4 w-4 text-gray-300" /> : <IconCircle aria-hidden="true" class="h-4 w-4" />
}
<IconCircle aria-hidden="true" class="h-4 w-4" />
{course.title}
</h3>
</a>
Expand Down
1 change: 0 additions & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import daisyui from "daisyui";
export default {
content: [
"{routes,islands,components}/**/*.{ts,tsx}",
// TO MAKE TAILWIND EXTENTION WORKING :(
"routes/**/*.{ts,tsx}",
"islands/**/*.{ts,tsx}",
"components/**/*.{ts,tsx}",
Expand Down

0 comments on commit cdd7c29

Please sign in to comment.