mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
feat(resources/marketplace): added typings client side
This commit is contained in:
1 parent
95866cc51c
commit
aa7919b988
2 files changed
+14
-3
No files matched your search
@@ -0,0 +1,9 @@
|
|||||||
|
export interface MarketplaceListing {
|
||||||
|
id: number;
|
||||||
|
identifier?: string;
|
||||||
|
name: string;
|
||||||
|
number: string;
|
||||||
|
title: string;
|
||||||
|
url: string;
|
||||||
|
description: string;
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
|
import { MarketplaceListing } from '../../phone/src/common/typings/marketplace';
|
||||||
|
import { IAlertProps } from '../../phone/src/common/typings/alerts';
|
||||||
|
|
||||||
onNet(events.SELLOUT_SEND_LISTING, (listing: any) => {
|
onNet(events.SELLOUT_SEND_LISTING, (listing: MarketplaceListing) => {
|
||||||
SendNuiMessage(
|
SendNuiMessage(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
app: 'SELLOUT',
|
app: 'SELLOUT',
|
||||||
@@ -11,7 +13,7 @@ onNet(events.SELLOUT_SEND_LISTING, (listing: any) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
RegisterNuiCallbackType(events.SELLOUT_ADD_LISTING);
|
RegisterNuiCallbackType(events.SELLOUT_ADD_LISTING);
|
||||||
on(`__cfx_nui:${events.SELLOUT_ADD_LISTING}`, (data: any) => {
|
on(`__cfx_nui:${events.SELLOUT_ADD_LISTING}`, (data: MarketplaceListing) => {
|
||||||
emitNet(events.SELLOUT_ADD_LISTING, data);
|
emitNet(events.SELLOUT_ADD_LISTING, data);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -21,7 +23,7 @@ on(`__cfx_nui:${events.SELLOUT_ADD_LISTING}`, (data: any) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
onNet(events.SELLOUT_ACTION_RESULT, (alert: { message: string, type: string }) => {
|
onNet(events.SELLOUT_ACTION_RESULT, (alert: IAlertProps) => {
|
||||||
SendNuiMessage(
|
SendNuiMessage(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
app: "SELLOUT",
|
app: "SELLOUT",
|
||||||
|
|||||||
Reference in new issue
Block a user