mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-05 23:39:16 +00:00
Update index.tsx
This commit is contained in:
parent
405b844c37
commit
a59f1cce8f
@ -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<Category[]>([]);
|
||||
@ -35,11 +38,13 @@ const CategoryView = () => {
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
||||
{selectedCategory.scripts
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map((script) => (
|
||||
.map((script: Script) => (
|
||||
<Card key={script.name}>
|
||||
<CardContent>
|
||||
<h3 className="text-lg font-medium">{script.name}</h3>
|
||||
<p className="text-sm text-gray-600">{script.date || "N/A"}</p>
|
||||
<p className="text-sm text-gray-600">
|
||||
{script.date_created || "No date available"}
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
|
Loading…
Reference in New Issue
Block a user