Skip to content

Commit

Permalink
Fix missing generateStaticParams error
Browse files Browse the repository at this point in the history
  • Loading branch information
agarun committed Jul 29, 2024
1 parent 65b67bc commit bfe6e24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/folders/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { getFolder, getFolders } from '@/lib/api';
import { slugToFolderName } from '@/lib/api/slug';
import { slugToFolderName, titleToSlug } from '@/lib/api/slug';
import Grid from '@/lib/images/pig-grid';
import Link from 'next/link';

export async function generateStaticParams() {
const folders = await getFolders();
return folders.map(folder => ({ slug: folder.title }));
return folders.map(folder => ({ slug: titleToSlug(folder.title) }));
}

async function Folder({ params: { slug } }: { params: { slug: string } }) {
Expand Down

0 comments on commit bfe6e24

Please sign in to comment.