Skip to content

Commit e11e79c

Browse files
committed
fix: locale reload in next build
1 parent 16af185 commit e11e79c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cmp/compiler/src/react/shared/TranslationContext.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ function TranslationProvider__Prod({
238238
}
239239
}, []); // Only run on mount
240240

241+
useEffect(() => {
242+
setTranslations(initialTranslations);
243+
}, [initialTranslations]);
244+
241245
/**
242246
* Change locale
243247
* - For Next.js SSR: triggers server re-render via router.refresh()

0 commit comments

Comments
 (0)