File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
2- import { Localized , useTranslate } from "@fluent/react" ;
2+ import { Localized , useLocalization } from "@fluent/react" ;
33
44export function SignIn ( ) {
5- const { l10n } = useTranslate ( )
5+ const { l10n } = useLocalization ( )
66
77 function showAlert ( id : string ) {
88 alert ( l10n . getString ( id ) ) ;
Original file line number Diff line number Diff line change @@ -22,4 +22,4 @@ export { LocalizationProvider } from "./provider";
2222export { withLocalization , WithLocalizationProps } from "./with_localization" ;
2323export { Localized , LocalizedProps } from "./localized" ;
2424export { MarkupParser } from "./markup" ;
25- export { useTranslate } from "./useTranslate " ;
25+ export { useLocalization } from "./use_localization " ;
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import { FluentContext } from "./context";
33import { ReactLocalization } from "./localization" ;
44
55/*
6- * The `useTranslate ` hook returns the FluentContext
6+ * The `useLocalization ` hook returns the FluentContext
77*/
8- type useTranslate = ( ) => { l10n : ReactLocalization }
9- export const useTranslate : useTranslate = ( ) => {
8+ type useLocalization = ( ) => { l10n : ReactLocalization }
9+ export const useLocalization : useLocalization = ( ) => {
1010 const l10n = useContext ( FluentContext ) ;
1111
1212 return { l10n } ;
1313} ;
1414
15- export default useTranslate ;
15+ export default useLocalization ;
You can’t perform that action at this time.
0 commit comments