{hasCopied ? $locales.server_id_copied : $locales.copy_server_id}
40 |{item.label}
17 |{$config.title.text ?? 'AC Scoreboard'}
21 | {/if} 22 |(events: DebugEvent
[], timer = 1000): void => {
16 | if (isEnvBrowser()) {
17 | for (const event of events) {
18 | setTimeout(() => {
19 | window.dispatchEvent(
20 | new MessageEvent('message', {
21 | data: {
22 | action: event.action,
23 | data: event.data,
24 | },
25 | })
26 | );
27 | }, timer);
28 | }
29 | }
30 | };
31 |
--------------------------------------------------------------------------------
/web/src/utils/fetchNui.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @param eventName - The endpoint eventname to target
3 | * @param data - Data you wish to send in the NUI Callback
4 | *
5 | * @return returnData - A promise for the data sent back by the NuiCallbacks CB argument
6 | */
7 |
8 | export async function fetchNui