3.2.1 • Published 8 months ago

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

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months 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

8 months ago

3.2.0

9 months ago

3.0.16

9 months ago

3.0.17

9 months ago

3.0.14

9 months ago

3.0.15

9 months ago

3.1.1

9 months ago

3.1.0

9 months ago

3.0.18

9 months ago

3.0.12

9 months ago

3.0.13

9 months ago

3.0.10

9 months ago

3.0.11

9 months ago

3.0.9

9 months ago

3.0.8

9 months ago

3.0.7

9 months ago

3.0.6

9 months ago

3.0.4

9 months ago

3.0.3

9 months ago

3.0.5

9 months ago

3.0.2

9 months ago

3.0.1

9 months ago

2.2.3

10 months ago

2.2.2

10 months ago

2.2.5

10 months ago

2.2.4

10 months ago

3.0.0

10 months ago

2.2.1

11 months ago

2.2.0

11 months ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.10.0

1 year ago

1.9.8

1 year ago

1.9.4-test.0

1 year ago

1.9.7

1 year ago

1.9.6

1 year ago

1.9.5

1 year ago

1.9.4-alpha.0

1 year ago

1.9.4

1 year ago

1.9.3

1 year ago

1.9.2

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.9.0-gamma.0

1 year ago

1.9.0-ts2.0

1 year ago

1.9.0-test.0

1 year ago

1.9.0-ts.0

1 year ago

1.9.0-alpha.0

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.10

1 year ago

1.6.10-alpha.0

1 year ago

1.6.9

1 year ago

1.6.8

2 years ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.7

2 years ago

1.6.6

2 years ago

1.6.5

2 years ago

1.6.0

3 years ago

1.5.16

3 years ago

1.5.17

3 years ago

1.5.5

3 years ago

1.4.6

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.5.10

3 years ago

1.5.12

3 years ago

1.5.11

3 years ago

1.5.14

3 years ago

1.5.13

3 years ago

1.5.15

3 years ago

1.5.9

3 years ago

1.5.8

3 years ago

1.4.9

3 years ago

1.5.7

3 years ago

1.4.11

3 years ago

1.4.8

3 years ago

1.5.6

3 years ago

1.4.10

3 years ago

1.4.7

3 years ago

1.4.12

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 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