Skip to content

Commit

Permalink
fix: prerender
Browse files Browse the repository at this point in the history
  • Loading branch information
golcinho committed Feb 22, 2024
1 parent daa7c89 commit 734afa9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/subscription/src/renderer/+onPrerenderStart.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default onPrerenderStart;

import { locales } from '../locales';
import { defaultLocale, locales } from '../locales';

import { PageContext, PrerenderContext } from './types';

Expand All @@ -10,9 +10,7 @@ function onPrerenderStart(prerenderContext: PrerenderContext) {
for (const pageContext of prerenderContext.pageContexts) {
for (const locale of Object.values(locales)) {
const urlOriginal =
pageContext.urlOriginal === locale
? pageContext.urlOriginal
: `/${locale}${pageContext.urlOriginal}`;
locale === defaultLocale ? pageContext.urlOriginal : `/${locale}${pageContext.urlOriginal}`;

pageContexts.push({ ...pageContext, locale, urlOriginal });
}
Expand Down

0 comments on commit 734afa9

Please sign in to comment.