REFACTORED - Flatten portfolio category routes to /portfolio/[slug]
Merge the category and project routes under a single /portfolio/[slug] segment via resolvePortfolioSlug (category wins over project on a slug clash). Removes the /portfolio/category/... prefix from links, redirect, and sitemap. Adds resolver integration tests.
This commit is contained in:
@@ -50,7 +50,7 @@ export default async function PortfolioPage({
|
||||
const selectedCategory = resolvedSearchParams?.category ?? "";
|
||||
|
||||
if (selectedCategory) {
|
||||
redirect(getLocalizedPath(localeKey, `/portfolio/category/${selectedCategory}`, siteSettings.defaultLocale));
|
||||
redirect(getLocalizedPath(localeKey, `/portfolio/${selectedCategory}`, siteSettings.defaultLocale));
|
||||
}
|
||||
|
||||
const [categories, projects] = await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user