feat: add explore page slug

feat/ai-rdm-slug
Arik Chakma 7 months ago
parent e4c0bad2c0
commit 41184fdb17
  1. 3
      src/components/ExploreAIRoadmap/AIRoadmapsList.tsx
  2. 1
      src/components/ExploreAIRoadmap/ExploreAIRoadmap.tsx

@ -26,7 +26,8 @@ export function AIRoadmapsList(props: AIRoadmapsListProps) {
return ( return (
<ul className="mb-4 grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3"> <ul className="mb-4 grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3">
{roadmaps.map((roadmap) => { {roadmaps.map((roadmap) => {
const roadmapLink = `/ai?id=${roadmap._id}`; const roadmapLink = `/ai/${roadmap.slug}`;
return ( return (
<a <a
key={roadmap._id} key={roadmap._id}

@ -19,6 +19,7 @@ export interface AIRoadmapDocument {
term: string; term: string;
title: string; title: string;
data: string; data: string;
slug: string;
viewCount: number; viewCount: number;
createdAt: Date; createdAt: Date;
updatedAt: Date; updatedAt: Date;

Loading…
Cancel
Save