Skip to content

Commit

Permalink
fix(plugin-theme-data): remove locale field in useThemeLocaleData, close
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Apr 20, 2023
1 parent 5d60575 commit 369ba17
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -26,7 +26,11 @@ export const useThemeLocaleData = <
export const resolveThemeLocaleData = (
theme: ThemeData,
routeLocale: RouteLocale
): ThemeData => ({
...theme,
...theme.locales?.[routeLocale],
})
): ThemeData => {
const { locales, ...baseOptions } = theme

return {
...baseOptions,
...locales?.[routeLocale],
}
}

0 comments on commit 369ba17

Please sign in to comment.