From 70ef075ccdd522972e1cef972adfa4f63d792341 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 23 Jan 2025 09:30:00 +0100 Subject: [PATCH] Update index.tsx --- frontend/src/app/category-view/index.tsx | 36 +++++++++++++----------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/frontend/src/app/category-view/index.tsx b/frontend/src/app/category-view/index.tsx index 23178b11..991447f7 100644 --- a/frontend/src/app/category-view/index.tsx +++ b/frontend/src/app/category-view/index.tsx @@ -1,11 +1,8 @@ -// Folder: category-view -// File: index.tsx - import React, { useState } from 'react'; import { Card, CardContent, CardHeader } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; -import { Grid } from '@/components/ui/grid'; -import routes from '@/routes'; // Assuming your route.ts file is at this location +import { routes } from '@/routes'; // Assuming your route.ts file is at this location +import { Grid } from '@mui/material'; // Using Material-UI's Grid const CategoryView = () => { const [selectedCategory, setSelectedCategory] = useState(null); @@ -34,27 +31,34 @@ const CategoryView = () => { Back to Categories

{selectedCategory.name}

- + {selectedCategory.scripts .sort((a, b) => a.name.localeCompare(b.name)) .map((script) => ( - - -

{script.name}

-

{script.date}

-
-
+ + + +

{script.name}

+

{script.date}

+
+
+
))}
) : (

Categories

- + {categories.map((category) => ( - handleCategoryClick(category)} className="cursor-pointer hover:shadow-lg"> - - + + handleCategoryClick(category)} + className="cursor-pointer hover:shadow-lg" + > + + + ))}