@autobusal/order-process 1.0.0 → 1.0.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/BKT/Bkt.tsx CHANGED
@@ -4,7 +4,7 @@ import { useForm } from 'react-hook-form';
4
4
  import { Inline } from '@autobusal/common';
5
5
  import { Container } from '../styles';
6
6
  import { BKTFormData } from '../types';
7
- import { MakeBkt } from '../services';
7
+ import { useMakeBkt } from '../services';
8
8
 
9
9
  interface Props {
10
10
  hash?: string
@@ -16,7 +16,7 @@ const Bkt = ({ hash, t }: Props): JSX.Element => {
16
16
 
17
17
  const ref = useRef<HTMLFormElement>(null);
18
18
 
19
- const { data, isLoading, isSuccess } = MakeBkt(String(hash));
19
+ const { data, isLoading, isSuccess } = useMakeBkt(String(hash));
20
20
 
21
21
  const onSubmit = (): void => {
22
22
  ref.current?.submit();
@@ -2,7 +2,7 @@ import { TFunction } from 'i18next';
2
2
  import { Navigate } from 'react-router-dom';
3
3
  import { Inline } from '@autobusal/common';
4
4
  import { Container } from '../styles';
5
- import { MakeStandard } from '../services';
5
+ import { useMakeStandard } from '../services';
6
6
 
7
7
  interface Props {
8
8
  type?: string
@@ -11,7 +11,7 @@ interface Props {
11
11
  }
12
12
 
13
13
  const Standard = ({ type, hash, t }: Props): JSX.Element => {
14
- const { data, isSuccess } = MakeStandard(String(type), String(hash));
14
+ const { data, isSuccess } = useMakeStandard(String(type), String(hash));
15
15
 
16
16
  if (isSuccess) {
17
17
  return <Navigate to={ data } />;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/order-process",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "main": "index.ts"
6
6
  }
package/services.ts CHANGED
@@ -2,7 +2,7 @@ import { useQuery, UseQueryResult } from '@tanstack/react-query';
2
2
  import { apiClient } from '@autobusal/providers';
3
3
  import { BKTData } from './types';
4
4
 
5
- export const MakeStandard = (type: string, hash: string): UseQueryResult<string> => (
5
+ export const useMakeStandard = (type: string, hash: string): UseQueryResult<string> => (
6
6
  useQuery({
7
7
  queryKey: ['process-payment-standard', { type, hash }],
8
8
  queryFn: async () => (
@@ -18,7 +18,7 @@ export const MakeStandard = (type: string, hash: string): UseQueryResult<string>
18
18
  })
19
19
  );
20
20
 
21
- export const MakeBkt = (hash: string): UseQueryResult<BKTData> => (
21
+ export const useMakeBkt = (hash: string): UseQueryResult<BKTData> => (
22
22
  useQuery({
23
23
  queryKey: ['process-payment-bkt', { hash }],
24
24
  queryFn: async () => (