From a59f1cce8fdf01bd209d8a80e22ba08971f95a84 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 23 Jan 2025 09:44:53 +0100 Subject: [PATCH] Update index.tsx --- frontend/src/app/category-view/index.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/category-view/index.tsx b/frontend/src/app/category-view/index.tsx index edf62ac8..171912a8 100644 --- a/frontend/src/app/category-view/index.tsx +++ b/frontend/src/app/category-view/index.tsx @@ -1,10 +1,13 @@ +// Folder: category-view +// File: index.tsx + "use client"; import React, { useEffect, useState } from "react"; import { Card, CardContent, CardHeader } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { fetchCategories } from "@/lib/data"; -import { Category } from "@/lib/types"; +import { Category, Script } from "@/lib/types"; const CategoryView = () => { const [categories, setCategories] = useState([]); @@ -35,11 +38,13 @@ const CategoryView = () => {
{selectedCategory.scripts .sort((a, b) => a.name.localeCompare(b.name)) - .map((script) => ( + .map((script: Script) => (

{script.name}

-

{script.date || "N/A"}

+

+ {script.date_created || "No date available"} +

))} @@ -65,4 +70,4 @@ const CategoryView = () => { ); }; -export default CategoryView; +export default CategoryView; \ No newline at end of file