@nuskin/address-lookup 1.0.0 → 1.0.1-pa-1033.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/address-lookup",
3
- "version": "1.0.0",
3
+ "version": "1.0.1-pa-1033.1",
4
4
  "description": "React component for address autocomplete using Egon and Smarty services",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
- import React, { useState } from 'react';
2
- import useEgonLookup from './hooks/useEgonLookup.jsx';
3
- import useEgonNormalize from './hooks/useEgonNormalize.jsx';
1
+ import { useState } from 'react';
2
+ import useEgonLookup from '../hooks/useEgonLookup.jsx';
3
+ import useEgonNormalize from '../hooks/useEgonNormalize.jsx';
4
4
 
5
5
  const EgonResults = ({ countryCode, onSelect }) => {
6
6
  const [query, setQuery] = useState('');
@@ -1,6 +1,6 @@
1
- import React, { useState, useEffect } from 'react';
2
- import useSmartyUSLookup from './hooks/useSmartyUSLookup.jsx';
3
- import useSmartyInternationalLookup from './hooks/useSmartyInternationalLookup.jsx';
1
+ import { useState, useEffect } from 'react';
2
+ import useSmartyUSLookup from '../hooks/useSmartyUSLookup.jsx';
3
+ import useSmartyInternationalLookup from '../hooks/useSmartyInternationalLookup.jsx';
4
4
 
5
5
  const SmartyResults = ({ countryCode, onSelect }) => {
6
6
  const [query, setQuery] = useState('');
@@ -22,7 +22,7 @@ const SmartyResults = ({ countryCode, onSelect }) => {
22
22
  error: smartyIntlError,
23
23
  responseTime: smartyIntlResponseTime
24
24
  } = useSmartyInternationalLookup(!isUS ? query : '', countryCode, selectedIntlAddressId, 300);
25
-
25
+
26
26
  const suggestions = isUS ? smartyUSSuggestions : smartyIntlSuggestions;
27
27
  const loading = isUS ? smartyUSLoading : smartyIntlLoading;
28
28
  const error = isUS ? smartyUSError : smartyIntlError;
@@ -23,7 +23,7 @@ const useEgonLookup = (query, countryCode = '', debounceMs = 300) => {
23
23
  const timer = setTimeout(async () => {
24
24
  try {
25
25
  const iso3 = COUNTRY_MAP[countryCode].iso3;
26
-
26
+
27
27
  const startTime = performance.now();
28
28
  const response = await axios.post(
29
29
  'https://egonapis.egoncloud.com:1257/Egon/api/single-line/full-address',