Skip to content

Commit

Permalink
fix i18n loading
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow committed Mar 18, 2024
1 parent 762856b commit bc9133b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions apps/app/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,7 @@ const MyApp = (appProps: AppPropsWithGridSwitch) => {
)
}

const i18NextSSRConfig: UserConfig = {
i18n: {
defaultLocale: nextI18nConfig.i18n.defaultLocale,
locales: nextI18nConfig.i18n.locales,
},
interpolation: nextI18nConfig.interpolation,
use: nextI18nConfig.use,
}

export default api.withTRPC(appWithTranslation(MyApp, i18NextSSRConfig))
export default api.withTRPC(appWithTranslation(MyApp, nextI18nConfig))

export type NextPageWithOptions<Props = unknown, InitialProps = Props> = NextPage<Props, InitialProps> & {
omitGrid?: boolean
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/pages/search/[...params]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export const getServerSideProps: GetServerSideProps<Record<string, unknown>, '/s
const ssg = await trpcServerClient({ req, res })

const [i18n] = await Promise.allSettled([
getServerSideTranslations(locale, ['services', 'common', 'attribute', 'country']),
getServerSideTranslations(locale, ['services', 'common', 'attribute']),
ssg.organization.searchDistance.prefetch({ lat, lon, dist, unit, skip, take }),
ssg.organization.getNatlCrisis.prefetch({ cca2: country }),
ssg.service.getFilterOptions.prefetch(),
Expand Down

0 comments on commit bc9133b

Please sign in to comment.