mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +00:00
feat(bank): update usage of enums
This commit is contained in:
1 parent
b42ee97450
commit
5654e1f46f
2 files changed
+5
-4
No files matched your search
@@ -6,6 +6,7 @@ import { useSetRecoilState } from 'recoil';
|
||||
import { useBankNotification } from './useBankNotification';
|
||||
import { IAlert, useSnackbar } from '../../../ui/hooks/useSnackbar';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { BankEvents } from '../../../../../typings/bank';
|
||||
|
||||
export const useBankService = () => {
|
||||
const setTransaction = useSetRecoilState(bankState.transactions);
|
||||
@@ -21,8 +22,8 @@ export const useBankService = () => {
|
||||
});
|
||||
};
|
||||
|
||||
useNuiEvent('BANK', 'setTransaction', setTransaction);
|
||||
useNuiEvent('BANK', 'setCredentials', setCredentials);
|
||||
useNuiEvent('BANK', BankEvents.SEND_TRANSFERS, setTransaction);
|
||||
useNuiEvent('BANK', BankEvents.SEND_CREDENTIALS, setCredentials);
|
||||
useNuiEvent('BANK', 'setAlert', handleAddAlert);
|
||||
useNuiEvent('BANK', 'setNotification', setNotification);
|
||||
return { useTransactions, useCredentials, useBankNotification };
|
||||
|
||||
@@ -5,7 +5,7 @@ onNet(BankEvents.SEND_TRANSFERS, (transfer: any) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'BANK',
|
||||
method: 'setTransaction',
|
||||
method: BankEvents.SEND_TRANSFERS,
|
||||
data: transfer,
|
||||
}),
|
||||
);
|
||||
@@ -15,7 +15,7 @@ onNet(BankEvents.SEND_CREDENTIALS, (credentials: any) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'BANK',
|
||||
method: 'setCredentials',
|
||||
method: BankEvents.SEND_CREDENTIALS,
|
||||
data: credentials,
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user