diff --git a/frontend/src/app/category-view/index.tsx b/frontend/src/app/category-view/index.tsx new file mode 100644 index 00000000..23178b11 --- /dev/null +++ b/frontend/src/app/category-view/index.tsx @@ -0,0 +1,66 @@ +// 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 + +const CategoryView = () => { + const [selectedCategory, setSelectedCategory] = useState(null); + + const handleCategoryClick = (category) => { + setSelectedCategory(category); + }; + + const handleBackClick = () => { + setSelectedCategory(null); + }; + + const categories = routes.map((route) => ({ + name: route.category, + scripts: route.scripts.map((script) => ({ + name: script.name, + date: script.date || 'N/A', // Assuming scripts have a `date` field + })), + })); + + return ( +
{script.date}
+