3.2.1 • Published 1 year ago

@arcteryx/components-click-and-collect v3.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

@arcteryx/components-click-and-collect

Components for click and collect; StoreAddress, StoreBlock, StoreBlockFullDetails, StoreFinder, StoreFinderSearch, StoreInventory, StoreName.

Install

npm install --save @arcteryx/components-click-and-collect

Translations

  • See root README file for translation workflow details

Usage

import { StoreFinder } from "@arcteryx/components-click-and-collect";
import { useLocation } from "@arcteryx/js-geolocation";

const Page = () => {
  const { country, market } = useSiteContext();
  const [location, setLocation] = useState(useLocation);
  const [storeInventoryList, setStoreInventoryList] = useState(null);
  const [selectedStore, setSelectedStore] = useState(getMyLocalStore());
  const [store, setStore] = useState(null);
  const [storeList, setStoreList] = useState(null);
  const [searchResultText, setSearchResultText] = useState(null);


  const handleSearchForm = () => { ... }
  const handleStoreSelected = () => { ... }

  const handleSearchForm = async (searchQuery) => {
    handleForm(searchQuery);
    const stores = await mockSearchStores();
    setStoreList(stores);
    setSearchResultText(getResultText(country));
    const inventory = await mockGetStoreInventory();
    setStoreInventoryList(inventory);
  }

  const handleStoreSelected = (store) => {
    setSelectedStore(store);
    saveMyLocalStore(market, store);
  }

  useEffect(() => {
    const getStoreInventory = async () => {
      setStoreInventoryList = await (location) => { .... }
    }

    getStoreInventory();
  }, [location]);

  return (
    <StoreFinderSearch
    country={country}
    sku={product.sku}
    onSearchForm={handleSearchForm}
    onStoreSelected={handleStoreSelected}
    selectedStore={selectedStore}
    storeInventoryList={storeInventoryList}
    storeList={storeList}
    searchResultText={searchResultText}
   />
  );
};
3.2.1

1 year ago

3.2.0

1 year ago

3.0.16

1 year ago

3.0.17

1 year ago

3.0.14

1 year ago

3.0.15

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.18

1 year ago

3.0.12

1 year ago

3.0.13

1 year ago

3.0.10

1 year ago

3.0.11

1 year ago

3.0.9

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.5

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

2.2.3

1 year ago

2.2.2

1 year ago

2.2.5

1 year ago

2.2.4

1 year ago

3.0.0

1 year ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.10.0

2 years ago

1.9.8

2 years ago

1.9.4-test.0

2 years ago

1.9.7

2 years ago

1.9.6

2 years ago

1.9.5

2 years ago

1.9.4-alpha.0

2 years ago

1.9.4

2 years ago

1.9.3

2 years ago

1.9.2

2 years ago

1.9.1

2 years ago

1.9.0

2 years ago

1.9.0-gamma.0

2 years ago

1.9.0-ts2.0

2 years ago

1.9.0-test.0

2 years ago

1.9.0-ts.0

2 years ago

1.9.0-alpha.0

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.10

2 years ago

1.6.10-alpha.0

2 years ago

1.6.9

2 years ago

1.6.8

2 years ago

1.6.4

3 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.7

3 years ago

1.6.6

3 years ago

1.6.5

3 years ago

1.6.0

3 years ago

1.5.16

3 years ago

1.5.17

3 years ago

1.5.5

4 years ago

1.4.6

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.5.10

4 years ago

1.5.12

4 years ago

1.5.11

4 years ago

1.5.14

4 years ago

1.5.13

4 years ago

1.5.15

4 years ago

1.5.9

4 years ago

1.5.8

4 years ago

1.4.9

4 years ago

1.5.7

4 years ago

1.4.11

4 years ago

1.4.8

4 years ago

1.5.6

4 years ago

1.4.10

4 years ago

1.4.7

4 years ago

1.4.12

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago