Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VO-1016] feat: Export types inside npm build #2689

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
feat(I18n): Add types to useI18n
  • Loading branch information
cballevre committed Nov 29, 2024
commit b52eed28404cb169cfbe8bde4ebb7c8ea5567c26
3 changes: 3 additions & 0 deletions react/providers/I18n/index.jsx
Original file line number Diff line number Diff line change
@@ -14,6 +14,9 @@ export const DEFAULT_LANG = 'en'

export const I18nContext = React.createContext()

/**
* @returns {{ t: (key: string) => string, lang: string }}
*/
export const useI18n = () => {
const context = useContext(I18nContext)