diff --git a/phone/src/apps/camera/components/CameraApp.tsx b/phone/src/apps/camera/components/CameraApp.tsx index 98aa9ea..369257e 100644 --- a/phone/src/apps/camera/components/CameraApp.tsx +++ b/phone/src/apps/camera/components/CameraApp.tsx @@ -5,11 +5,12 @@ import { GalleryGrid } from './grid/GalleryGrid'; import { GalleryModal } from './modal/GalleryModal'; import InjectDebugData from '../../../os/debug/InjectDebugData'; import { Route, Switch } from 'react-router-dom'; +import { PhotoEvents } from '../../../../../typings/photo'; InjectDebugData([ { app: 'CAMERA', - method: 'setPhotos', + method: PhotoEvents.SEND_PHOTOS, data: [ { id: 1, diff --git a/phone/src/apps/camera/hooks/usePhotoService.ts b/phone/src/apps/camera/hooks/usePhotoService.ts index 67c5190..4b39963 100644 --- a/phone/src/apps/camera/hooks/usePhotoService.ts +++ b/phone/src/apps/camera/hooks/usePhotoService.ts @@ -1,8 +1,9 @@ import { useSetRecoilState } from 'recoil'; import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent'; import { photoState } from './state'; +import { PhotoEvents } from '../../../../../typings/photo'; export const usePhotoService = () => { const setPhotos = useSetRecoilState(photoState.photos); - useNuiEvent('CAMERA', 'setPhotos', setPhotos); + useNuiEvent('CAMERA', PhotoEvents.SEND_PHOTOS, setPhotos); }; diff --git a/phone/src/apps/contacts/components/ContactsApp.tsx b/phone/src/apps/contacts/components/ContactsApp.tsx index bf8d316..e1373f5 100644 --- a/phone/src/apps/contacts/components/ContactsApp.tsx +++ b/phone/src/apps/contacts/components/ContactsApp.tsx @@ -9,6 +9,7 @@ import { Route } from 'react-router-dom'; import ContactsInfoPage from './views/ContactInfo'; import { ContactPage } from './views/ContactsPage'; import { ContactsThemeProvider } from '../providers/ContactsThemeProvider'; +import { ContactEvents } from '../../../../../typings/contact'; export const ContactsApp = () => { const contacts = useApp('CONTACTS'); @@ -29,7 +30,7 @@ export const ContactsApp = () => { InjectDebugData([ { app: 'CONTACTS', - method: 'setContacts', + method: ContactEvents.SEND_CONTACTS, data: [ { id: 1, diff --git a/phone/src/apps/dialer/components/DialerApp.tsx b/phone/src/apps/dialer/components/DialerApp.tsx index cedf20f..fe6e92c 100644 --- a/phone/src/apps/dialer/components/DialerApp.tsx +++ b/phone/src/apps/dialer/components/DialerApp.tsx @@ -11,6 +11,7 @@ import { useDialHistory } from '../hooks/useDialHistory'; import InjectDebugData from '../../../os/debug/InjectDebugData'; import { ContactList } from '../../contacts/components/List/ContactList'; import { DialerThemeProvider } from '../providers/DialerThemeProvider'; +import { CallEvents } from '../../../../../typings/call'; export const DialerApp = () => { const history = useDialHistory(); @@ -40,7 +41,7 @@ export const DialerApp = () => { InjectDebugData([ { app: 'DIALER', - method: 'setHistory', + method: CallEvents.SET_CALL_HISTORY, data: [ { id: 1, diff --git a/phone/src/apps/match/components/MatchApp.tsx b/phone/src/apps/match/components/MatchApp.tsx index 82a83d8..1e5e5fe 100644 --- a/phone/src/apps/match/components/MatchApp.tsx +++ b/phone/src/apps/match/components/MatchApp.tsx @@ -54,7 +54,7 @@ InjectDebugData( [ { app: 'MATCH', - method: 'phone:getMatchProfilesSuccess', + method: MatchEvents.GET_PROFILES_SUCCESS, data: [ { id: 1, @@ -102,7 +102,7 @@ InjectDebugData( }, { app: 'MATCH', - method: 'phone:getMyProfileSuccess', + method: MatchEvents.GET_MY_PROFILE_SUCCESS, data: { id: 4, image: @@ -120,7 +120,7 @@ InjectDebugData( }, { app: 'MATCH', - method: 'phone:getMatchesSuccess', + method: MatchEvents.GET_MATCHES_SUCCESS, data: [ { id: 5, diff --git a/phone/src/apps/notes/NotesApp.tsx b/phone/src/apps/notes/NotesApp.tsx index 33cb48e..5f66819 100644 --- a/phone/src/apps/notes/NotesApp.tsx +++ b/phone/src/apps/notes/NotesApp.tsx @@ -12,6 +12,7 @@ import useStyles from './notes.styles'; import InjectDebugData from '../../os/debug/InjectDebugData'; import { NotesThemeProvider } from './providers/NotesThemeProvider'; import { Route, useHistory } from 'react-router-dom'; +import { NotesEvents } from '../../../../typings/notes'; export const NotesApp = () => { const classes = useStyles(); @@ -43,7 +44,7 @@ export const NotesApp = () => { InjectDebugData([ { app: 'NOTES', - method: 'setNotes', + method: NotesEvents.SEND_NOTE, data: [ { id: 1, diff --git a/phone/src/apps/twitter/components/TwitterApp.tsx b/phone/src/apps/twitter/components/TwitterApp.tsx index e0322b6..433fd4e 100644 --- a/phone/src/apps/twitter/components/TwitterApp.tsx +++ b/phone/src/apps/twitter/components/TwitterApp.tsx @@ -78,7 +78,7 @@ export const TwitterApp = () => { InjectDebugData([ { app: 'TWITTER', - method: 'getOrCreateTwitterProfile', + method: TwitterEvents.GET_OR_CREATE_PROFILE, data: { profile_name: 'Angular_Dev', bio: 'Angular FTW', @@ -89,7 +89,7 @@ InjectDebugData([ }, { app: 'TWITTER', - method: 'fetchTweets', + method: TwitterEvents.FETCH_TWEETS, data: [ { id: 59, @@ -150,7 +150,7 @@ InjectDebugData( [ { app: 'TWITTER', - method: 'createTweetBroadcast', + method: TwitterEvents.CREATE_TWEET_BROADCAST, data: { id: 111, profile_id: 111, @@ -162,7 +162,7 @@ InjectDebugData( }, { app: 'TWITTER', - method: 'createTweetBroadcast', + method: TwitterEvents.CREATE_TWEET_BROADCAST, data: { id: 111, profile_id: 111, diff --git a/resources/client/cl_photo.ts b/resources/client/cl_photo.ts index 4df26ca..dc9f8b9 100644 --- a/resources/client/cl_photo.ts +++ b/resources/client/cl_photo.ts @@ -76,7 +76,7 @@ const handleCameraExit = () => { }; onNet(PhotoEvents.SEND_PHOTOS, (photos: string[]) => { - sendCameraEvent('setPhotos', photos); + sendCameraEvent(PhotoEvents.SEND_PHOTOS, photos); }); function takePhoto() {