@opexa/portal-components 0.0.891 → 0.0.892

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,9 @@ const Step1Definition = (countryCode) => z.object({
63
63
  export function MobileNumberSignInInternational() {
64
64
  const signInProps = useSignInPropsContext();
65
65
  const localeInfo = useLocaleInfo();
66
- const [areaCode, setAreaCode] = useState(getCountryDetails(localeInfo.country.code).areaCode);
66
+ const [areaCode, setAreaCode] = useState(signInProps.enabledCountries?.includes(localeInfo.country.code)
67
+ ? getCountryDetails(localeInfo.country.code).areaCode
68
+ : 'AE');
67
69
  const router = useRouter();
68
70
  const context = useSignInContext();
69
71
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -41,7 +41,9 @@ import { useSignUpDefaultPropsContext } from './SignUpDefaultContext.js';
41
41
  export function SignUpDefaultFormInternational() {
42
42
  const signUpProps = useSignUpDefaultPropsContext();
43
43
  const localeInfo = useLocaleInfo();
44
- const [areaCode, setAreaCode] = useState(getCountryDetails(localeInfo.country.code).areaCode);
44
+ const [areaCode, setAreaCode] = useState(signUpProps.enabledCountries?.includes(localeInfo.country.code)
45
+ ? getCountryDetails(localeInfo.country.code).areaCode
46
+ : 'AE');
45
47
  const branchCollection = createListCollection({
46
48
  items: signUpProps.branches ?? [],
47
49
  itemToValue: (item) => item.code,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.891",
3
+ "version": "0.0.892",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",