Skip to content

Commit

Permalink
this is needed for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrosen committed Nov 18, 2023
1 parent 563429a commit 756822e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/app/articles/[id]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import fs from 'fs';
export function generateStaticParams() {
const articles = loadArticles()

return articles.map(article => ({
id: article.slug,
}))
return articles.flatMap(article => ([
{id: article.slug},
// {id: encodeURIComponent(article.slug)}, // this is needed for dev
]))
}

export default function Page({ params }) {
Expand Down
7 changes: 4 additions & 3 deletions src/app/playlists/[id]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ function get_genres(playlist) {
export function generateStaticParams() {
const playlists = loadPlaylists()

return playlists.map(playlist => ({
id: playlist.name,
}))
return playlists.flatMap(playlist => ([
{id: playlist.name},
// {id: encodeURIComponent(playlist.name)}, // this is needed for dev
]))
}

export default function Page({ params }) {
Expand Down

0 comments on commit 756822e

Please sign in to comment.