File size: 780 Bytes
fcd4478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { auth } from '@/auth';
import { fetchRecentProjectList } from '@/lib/fetch/clef';
import { redirect } from 'next/navigation';
import { v5 as uuidV5 } from 'uuid';
import ProjectCard from './ProjectCard';

export interface ProjectListSideBarProps {}

const ProjectListSideBar: React.FC<ProjectListSideBarProps> = async () => {
	const recentProjects = await fetchRecentProjectList();
	return (
		<div
			data-state="open"
			className="peer absolute inset-y-0 z-30 hidden border-r bg-muted duration-300 ease-in-out translate-x-0 lg:flex lg:w-[250px] xl:w-[300px] h-full flex-col dark:bg-zinc-950 overflow-auto py-2"
		>
			{recentProjects.map(project => (
				<ProjectCard key={project.id} projectInfo={project} />
			))}
		</div>
	);
};

export default ProjectListSideBar;