feat(bank/nui): useNotesService | mock data

This commit is contained in:
chip committed 2020-10-29 00:06:26 +01:00
1 parent 448b273dea
commit 3f6600c28c
1 file changed
+26
+26
View File
@@ -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;