Refactors useLocale (#908)

* Removes unused component

* Refactors useLocale

We don't need to pass the locale prop everywhere

* Fixes syntax error

* Adds warning for missing localeProps

* Simplify i18n utils

* Update components/I18nLanguageHandler.tsx

Co-authored-by: Mihai C <34626017+mihaic195@users.noreply.github.com>

* Type fixes

Co-authored-by: Mihai C <34626017+mihaic195@users.noreply.github.com>
This commit is contained in:
Omar LópezandMihai C authored and GitHub committed 2021-10-12 13:11:33 +00:00
1 parent 7dd6fdde7a
commit cfd70172f0
35 files changed
+366 -440

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ import { SVGComponent } from "@lib/types/SVGComponent";
import Button from "./Button";
type ActionType = {
export type ActionType = {
id: string;
icon: SVGComponent;
label: string;
+1 -1
View File
@@ -4,7 +4,7 @@ import "react-phone-number-input/style.css";
import classNames from "@lib/classNames";
export const PhoneInput = (props) => (
export const PhoneInput = (props: any /* FIXME */) => (
<BasePhoneInput
{...props}
className={classNames(