Refactor Directus types: rename to schemas.ts, fix imports, and resolve type errors

This commit is contained in:
cawcenter
2025-12-14 12:48:08 -05:00
parent 99f406e998
commit a74a4e946d
15 changed files with 716 additions and 915 deletions

View File

@@ -4,7 +4,7 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@
// Assume Table isn't fully ready or use Grid for now to be safe.
import { Card } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Post } from '@/types/schema';
import { Posts as Post } from '@/lib/schemas';
export default function PostList() {
const [posts, setPosts] = useState<Post[]>([]);
@@ -52,14 +52,11 @@ export default function PostList() {
{post.status}
</Badge>
</td>
<td className="px-6 py-4">
{new Date(post.date_created || '').toLocaleDateString()}
</td>
</tr>
))}
{posts.length === 0 && (
<tr>
<td colSpan={4} className="px-6 py-12 text-center text-slate-500">
<td colSpan={3} className="px-6 py-12 text-center text-slate-500">
No posts found.
</td>
</tr>