[skip ci] fix typo TransactionWithdrawalEmoneyContext to TransactionWithDrawalEmoneyContext
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
import { TransactionWithdrawEmoneyProvider } from './hooks/TransactionWithDrawalEmoneyContext';
|
|
||||||
import { Container } from '@/components';
|
import { Container } from '@/components';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
import WithdrawInput from './blocks/WithdrawInput';
|
import WithdrawInput from './blocks/WithdrawInput';
|
||||||
|
import { TransactionWithdrawalEmoneyProvider } from './hooks/TransactionWithDrawalEmoneyContext';
|
||||||
|
|
||||||
const WithdrawalEmoney = () => {
|
const WithdrawalEmoney = () => {
|
||||||
return (
|
return (
|
||||||
@ -10,7 +10,7 @@ const WithdrawalEmoney = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>TPAY | Withdrawal Emoney</title>
|
<title>TPAY | Withdrawal Emoney</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<TransactionWithdrawEmoneyProvider>
|
<TransactionWithdrawalEmoneyProvider>
|
||||||
<Container className="mb-7">
|
<Container className="mb-7">
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">
|
||||||
TRANSACTION WITHDRAWAL EMONEY
|
TRANSACTION WITHDRAWAL EMONEY
|
||||||
@ -28,7 +28,7 @@ const WithdrawalEmoney = () => {
|
|||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<WithdrawInput />
|
<WithdrawInput />
|
||||||
</Container>
|
</Container>
|
||||||
</TransactionWithdrawEmoneyProvider>
|
</TransactionWithdrawalEmoneyProvider>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { apiConfig } from '@/config/api.config';
|
import { apiConfig } from '@/config/api.config';
|
||||||
import { createContext } from 'react';
|
import { createContext } from 'react';
|
||||||
|
|
||||||
interface TransactionWithdrawProps {
|
interface TransactionWithdrawalProps {
|
||||||
id: string;
|
id: string;
|
||||||
customers_id: string;
|
customers_id: string;
|
||||||
group_id: string;
|
group_id: string;
|
||||||
@ -16,7 +16,7 @@ interface ContextProps {}
|
|||||||
|
|
||||||
const initialProps: ContextProps = {};
|
const initialProps: ContextProps = {};
|
||||||
|
|
||||||
const TranscationWithdrawEmoneyContext = createContext<ContextProps>(initialProps);
|
const TransactionWithdrawalEmoneyContext = createContext<ContextProps>(initialProps);
|
||||||
const API_URL = apiConfig.service_customer;
|
const API_URL = apiConfig.service_customer;
|
||||||
|
|
||||||
type StatusCode = 'W' | 'Y' | 'N' | 'T';
|
type StatusCode = 'W' | 'Y' | 'N' | 'T';
|
||||||
@ -47,13 +47,12 @@ export const renderStatusBadge = (statusRaw: string | null | undefined) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const TransactionWithdrawEmoneyProvider = ({ children }: { children: React.ReactNode }) => {
|
const TransactionWithdrawalEmoneyProvider = ({ children }: { children: React.ReactNode }) => {
|
||||||
return (
|
return (
|
||||||
<TranscationWithdrawEmoneyContext.Provider value={{}}>
|
<TransactionWithdrawalEmoneyContext.Provider value={{}}>
|
||||||
<div>{children}</div>
|
<div>{children}</div>
|
||||||
</TranscationWithdrawEmoneyContext.Provider>
|
</TransactionWithdrawalEmoneyContext.Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export { TransactionWithdrawEmoneyProvider, TranscationWithdrawEmoneyContext };
|
export { TransactionWithdrawalEmoneyProvider, TransactionWithdrawalEmoneyContext };
|
||||||
export type { TransactionWithdrawProps };
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import { TransactionWithdrawContext } from '../../withdrawl-saldo/hooks';
|
import { TransactionWithdrawalEmoneyContext } from './TransactionWithDrawalEmoneyContext';
|
||||||
|
|
||||||
const useTransactionWithdrawalEmoney = () => {
|
const useTransactionWithdrawalEmoneyContext = () => {
|
||||||
const context = useContext(TransactionWithdrawContext);
|
const context = useContext(TransactionWithdrawalEmoneyContext);
|
||||||
|
|
||||||
if (!context) throw new Error('useTransactionWithdrawalEmoney must be used within AuthProvider');
|
if (!context) throw new Error('useTransactionWithdrawalEmoney must be used within AuthProvider');
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
};
|
};
|
||||||
|
|
||||||
export { useTransactionWithdrawalEmoney };
|
export { useTransactionWithdrawalEmoneyContext };
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import { TranscationWithdrawEmoneyContext } from '../../withdrawl-emoney/hooks/TransactionWithDrawalEmoneyContext';
|
import { TransactionWithdrawContext } from './TransactionWithdrawContext';
|
||||||
|
|
||||||
const useTransactionWithdrawContext = () => {
|
const useTransactionWithdrawContext = () => {
|
||||||
const context = useContext(TranscationWithdrawEmoneyContext);
|
const context = useContext(TransactionWithdrawContext);
|
||||||
|
|
||||||
if (!context) throw new Error('useTransactionWithdrawContext must be used within AuthProvider');
|
if (!context) throw new Error('useTransactionWithdrawContext must be used within AuthProvider');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user