From 3f6600c28c589d0a2a6188328c1e1b2fdc70f494 Mon Sep 17 00:00:00 2001 From: chip Date: Thu, 29 Oct 2020 00:06:26 +0100 Subject: [PATCH] feat(bank/nui): useNotesService | mock data --- phone/src/Phone.tsx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/phone/src/Phone.tsx b/phone/src/Phone.tsx index 4fe7842..588e1cf 100644 --- a/phone/src/Phone.tsx +++ b/phone/src/Phone.tsx @@ -20,6 +20,7 @@ import { useContactsService } from "./apps/contacts/hooks/useContactsService"; import { useTwitterService } from "./apps/twitter/hooks/useTwitterService"; import { useSelloutService } from "./apps/sellout/hooks/useSelloutService"; import { useBankService } from './apps/bank/hooks/useBankService'; +import { useNotesService } from "./apps/notes/hooks/useNotesService"; //These events are just for testing. Comment it out before building. setTimeout(() => { @@ -35,6 +36,30 @@ setTimeout(() => { }, 1000); +setTimeout(() => { + window.dispatchEvent( + new MessageEvent("message", { + data: { + app: 'NOTES', + method: 'setNotes', + data: [ + { + id: 1, + title: 'First note', + content: 'Hello, this is my shitty note' + }, + { + id: 2, + title: 'Second note', + content: 'Hello, this is another shitty note' + } + ] + } + }) + ) +}, 1000) + + setTimeout(() => { window.dispatchEvent( new MessageEvent("message", { @@ -183,6 +208,7 @@ function Phone() { useInitKeyboard(); useSelloutService(); useBankService(); + useNotesService(); if (visibility === false) { return null;