Skip to content

Commit

Permalink
fix(usei18n): correct useTranslation type (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
chambo-e authored Aug 13, 2021
1 parent 89c9698 commit 55f183d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/use-i18n/src/usei18n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const useI18n = (): Context => {
return context
}

export const useTranslation = (namespaces: string[] = [], load: LoadTranslationsFn): Context & { isLoaded: boolean } => {
export const useTranslation = (namespaces: string[] = [], load?: LoadTranslationsFn): Context & { isLoaded: boolean } => {
const context = useContext(I18nContext)
if (context === undefined) {
throw new Error('useTranslation must be used within a I18nProvider')
Expand Down

0 comments on commit 55f183d

Please sign in to comment.