|
|
@ -132,28 +132,33 @@ export function ExploreAIRoadmap() { |
|
|
|
<div className="text-center text-gray-800">No roadmaps found</div> |
|
|
|
<div className="text-center text-gray-800">No roadmaps found</div> |
|
|
|
) : ( |
|
|
|
) : ( |
|
|
|
<ul className="grid grid-cols-3 gap-2"> |
|
|
|
<ul className="grid grid-cols-3 gap-2"> |
|
|
|
{roadmaps.map((roadmap) => ( |
|
|
|
{roadmaps.map((roadmap) => { |
|
|
|
<li key={roadmap._id} className="rounded-md border"> |
|
|
|
const roadmapLink = `/ai?id=${roadmap._id}`; |
|
|
|
<h2 |
|
|
|
return ( |
|
|
|
className="truncate px-2.5 py-2.5 text-xl font-medium leading-none tracking-wide" |
|
|
|
<li key={roadmap._id}> |
|
|
|
title={roadmap.topic} |
|
|
|
<a href={roadmapLink} className="block rounded-md border"> |
|
|
|
> |
|
|
|
<h2 |
|
|
|
{roadmap.topic} |
|
|
|
className="truncate px-2.5 py-2.5 text-xl font-medium leading-none tracking-wide" |
|
|
|
</h2> |
|
|
|
title={roadmap.topic} |
|
|
|
<div className="flex items-center justify-between gap-2 border-t px-2.5 py-2"> |
|
|
|
> |
|
|
|
<span className="flex items-center gap-1.5 text-sm text-gray-600"> |
|
|
|
{roadmap.topic} |
|
|
|
<Eye size={15} className="inline-block" /> |
|
|
|
</h2> |
|
|
|
<span>{roadmap?.viewCount || 0} views</span> |
|
|
|
<div className="flex items-center justify-between gap-2 border-t px-2.5 py-2"> |
|
|
|
</span> |
|
|
|
<span className="flex items-center gap-1.5 text-sm text-gray-600"> |
|
|
|
<span className="flex items-center gap-1.5 text-sm text-gray-600"> |
|
|
|
<Eye size={15} className="inline-block" /> |
|
|
|
<CalendarCheck size={15} className="inline-block" /> |
|
|
|
<span>{roadmap?.viewCount || 0} views</span> |
|
|
|
<span> |
|
|
|
</span> |
|
|
|
{getRelativeTimeString(String(roadmap?.createdAt))} |
|
|
|
<span className="flex items-center gap-1.5 text-sm text-gray-600"> |
|
|
|
</span> |
|
|
|
<CalendarCheck size={15} className="inline-block" /> |
|
|
|
</span> |
|
|
|
<span> |
|
|
|
</div> |
|
|
|
{getRelativeTimeString(String(roadmap?.createdAt))} |
|
|
|
</li> |
|
|
|
</span> |
|
|
|
))} |
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
})} |
|
|
|
{hasMorePages && ( |
|
|
|
{hasMorePages && ( |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<button |
|
|
|
<button |
|
|
|