@open-tender/utils 0.5.6 → 0.5.7

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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { FormFields, RequestError, RequestStatus } from '@open-tender/types';
3
- export declare const useClaimRewardCoderForm: (loading: RequestStatus, error: RequestError, claim: (reward_code: string, callback: () => void) => void, callback: () => void) => {
3
+ export declare const useClaimRewardCodeForm: (loading: RequestStatus, error: RequestError, claim: (reward_code: string, callback: () => void) => void, callback: () => void) => {
4
4
  submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
5
5
  inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
6
6
  fields: FormFields;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useClaimRewardCoderForm = void 0;
3
+ exports.useClaimRewardCodeForm = void 0;
4
4
  const react_1 = require("react");
5
5
  const utils_1 = require("../utils");
6
- const useClaimRewardCoderForm = (loading, error, claim, callback) => {
6
+ const useClaimRewardCodeForm = (loading, error, claim, callback) => {
7
7
  const submitRef = (0, react_1.useRef)(null);
8
8
  const inputRef = (0, react_1.useRef)(null);
9
9
  const [data, setData] = (0, react_1.useState)({ reward_code: '' });
@@ -47,4 +47,4 @@ const useClaimRewardCoderForm = (loading, error, claim, callback) => {
47
47
  handleSubmit
48
48
  };
49
49
  };
50
- exports.useClaimRewardCoderForm = useClaimRewardCoderForm;
50
+ exports.useClaimRewardCodeForm = useClaimRewardCodeForm;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { FormFields, RequestError, RequestStatus } from '@open-tender/types';
3
- export declare const useClaimRewardCoderForm: (loading: RequestStatus, error: RequestError, claim: (reward_code: string, callback: () => void) => void, callback: () => void) => {
3
+ export declare const useClaimRewardCodeForm: (loading: RequestStatus, error: RequestError, claim: (reward_code: string, callback: () => void) => void, callback: () => void) => {
4
4
  submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
5
5
  inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
6
6
  fields: FormFields;
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect, useRef } from 'react';
2
2
  import { makeFormErrors } from '../utils';
3
- export const useClaimRewardCoderForm = (loading, error, claim, callback) => {
3
+ export const useClaimRewardCodeForm = (loading, error, claim, callback) => {
4
4
  const submitRef = useRef(null);
5
5
  const inputRef = useRef(null);
6
6
  const [data, setData] = useState({ reward_code: '' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",