mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
update marketplace enums
This commit is contained in:
1 parent
5ce6cf2d4a
commit
a6f98d7ac0
3 files changed
+6
-4
No files matched your search
@@ -4,6 +4,7 @@ import { useListing } from './useListing';
|
|||||||
import { useSetRecoilState } from 'recoil';
|
import { useSetRecoilState } from 'recoil';
|
||||||
import { IAlert, useSnackbar } from '../../../ui/hooks/useSnackbar';
|
import { IAlert, useSnackbar } from '../../../ui/hooks/useSnackbar';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { MarketplaceEvents } from '../../../../../typings/marketplace';
|
||||||
|
|
||||||
export const useSelloutService = () => {
|
export const useSelloutService = () => {
|
||||||
const setSellout = useSetRecoilState(selloutState.listing);
|
const setSellout = useSetRecoilState(selloutState.listing);
|
||||||
@@ -17,7 +18,7 @@ export const useSelloutService = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
useNuiEvent('SELLOUT', 'setAlert', handleAddAlert);
|
useNuiEvent('SELLOUT', MarketplaceEvents.SEND_ALERT, handleAddAlert);
|
||||||
useNuiEvent('SELLOUT', 'setListings', setSellout);
|
useNuiEvent('SELLOUT', MarketplaceEvents.SEND_LISTING, setSellout);
|
||||||
return useListing();
|
return useListing();
|
||||||
};
|
};
|
||||||
@@ -3,7 +3,7 @@ import { IAlertProps } from '../../typings/alerts';
|
|||||||
import { sendMarketplaceEvent } from '../utils/messages';
|
import { sendMarketplaceEvent } from '../utils/messages';
|
||||||
|
|
||||||
onNet(MarketplaceEvents.SEND_LISTING, (listings: MarketplaceListing[]) => {
|
onNet(MarketplaceEvents.SEND_LISTING, (listings: MarketplaceListing[]) => {
|
||||||
sendMarketplaceEvent('setListings', listings);
|
sendMarketplaceEvent(MarketplaceEvents.SEND_LISTING, listings);
|
||||||
});
|
});
|
||||||
|
|
||||||
RegisterNuiCallbackType(MarketplaceEvents.ADD_LISTING);
|
RegisterNuiCallbackType(MarketplaceEvents.ADD_LISTING);
|
||||||
@@ -33,5 +33,5 @@ onNet(MarketplaceEvents.DELETE_LISTING_SUCCESS, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
onNet(MarketplaceEvents.ACTION_RESULT, (alert: IAlertProps) => {
|
onNet(MarketplaceEvents.ACTION_RESULT, (alert: IAlertProps) => {
|
||||||
sendMarketplaceEvent('setAlert', alert);
|
sendMarketplaceEvent(MarketplaceEvents.SEND_ALERT, alert);
|
||||||
});
|
});
|
||||||
@@ -20,4 +20,5 @@ export enum MarketplaceEvents {
|
|||||||
REPORT_LISTING = 'npwd:reportListing',
|
REPORT_LISTING = 'npwd:reportListing',
|
||||||
REPORT_LISTING_SUCCESS = 'npwd:reportListingSuccess',
|
REPORT_LISTING_SUCCESS = 'npwd:reportListingSuccess',
|
||||||
REPORT_LISTING_SUCESS = 'npwd:reportListingFailed',
|
REPORT_LISTING_SUCESS = 'npwd:reportListingFailed',
|
||||||
|
SEND_ALERT = 'nwpd:sendListingAlert',
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user