mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-12 01:46:08 +00:00
refactor: Migrate dashboard project listing to client components, adding URL-driven filtering, sorting, and pagination.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
'use client';
|
||||
|
||||
import { ProjectFilter } from './project-filter';
|
||||
|
||||
interface SerializedProject {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
visibility: string;
|
||||
updatedAt: string;
|
||||
workspaceId: string | null;
|
||||
workspaceName: string | null;
|
||||
memberCount: number;
|
||||
videoCount: number;
|
||||
}
|
||||
|
||||
interface DashboardClientProps {
|
||||
serializedProjects: SerializedProject[];
|
||||
workspaces: { id: string; name: string }[];
|
||||
totalPages: number;
|
||||
}
|
||||
|
||||
export function DashboardClient({ serializedProjects, workspaces, totalPages }: DashboardClientProps) {
|
||||
return (
|
||||
<div className="px-6 lg:px-8 py-8 w-full">
|
||||
<ProjectFilter
|
||||
projects={serializedProjects}
|
||||
workspaces={workspaces}
|
||||
totalPages={totalPages}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user