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:
@@ -35,7 +35,7 @@ describe("PortfolioCategoryFilter", () => {
|
||||
expect(screen.getByRole("link", { name: "All" })).toHaveAttribute("href", "/en/portfolio");
|
||||
expect(screen.getByRole("link", { name: "Branding" })).toHaveAttribute(
|
||||
"href",
|
||||
"/en/portfolio/category/branding",
|
||||
"/en/portfolio/branding",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -51,7 +51,7 @@ describe("PortfolioCategoryFilter", () => {
|
||||
// German locale on the default locale -> unprefixed paths and German labels
|
||||
expect(screen.getByRole("link", { name: "Marke" })).toHaveAttribute(
|
||||
"href",
|
||||
"/portfolio/category/branding",
|
||||
"/portfolio/branding",
|
||||
);
|
||||
expect(screen.getByRole("link", { name: "Alle" })).toHaveAttribute("href", "/portfolio");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user