Skip to content

Commit

Permalink
chore: nothing to optimize anymore in breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
gustaveWPM committed Oct 19, 2024
1 parent 7a05518 commit 28fd3f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ export async function generateStaticParams() {
}

export default function Page({ params }: BlogSubcategoryPageProps) {
const language = params[I18nTaxonomy.LANGUAGE];
const [category, subcategory, language] = [params[BlogTaxonomy.CATEGORY], params[BlogTaxonomy.SUBCATEGORY], params[I18nTaxonomy.LANGUAGE]];

setStaticParamsLocale(language);

const categ = params[BlogTaxonomy.CATEGORY];
const subcateg = params[BlogTaxonomy.SUBCATEGORY];
const pathname = buildAbsolutePathFromParts(ROUTES_ROOTS.BLOG, categ, subcateg);
const pathname = buildAbsolutePathFromParts(ROUTES_ROOTS.BLOG, category, subcategory);

return (
<div className="mx-8 flex flex-col items-center lg:mx-auto lg:max-w-[750px]" data-pagefind-ignore="all">
Expand Down
6 changes: 3 additions & 3 deletions src/app/[locale]/(pages)/(withfooter)/blog/[categ]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ export async function generateStaticParams() {
}

export default function Page({ params }: BlogCategoryPageProps) {
const language = params[I18nTaxonomy.LANGUAGE];
const [category, language] = [params[BlogTaxonomy.CATEGORY], params[I18nTaxonomy.LANGUAGE]];

setStaticParamsLocale(language);

const categ = params[BlogTaxonomy.CATEGORY];
const pathname = buildAbsolutePathFromParts(ROUTES_ROOTS.BLOG, categ);
const pathname = buildAbsolutePathFromParts(ROUTES_ROOTS.BLOG, category);

return (
<div className="mx-8 flex flex-col items-center lg:mx-auto lg:max-w-[750px]" data-pagefind-ignore="all">
Expand Down

0 comments on commit 28fd3f4

Please sign in to comment.