fix(phone/types): Replaced debug inject methods with new enums"

This commit is contained in:
Taso committed 2021-04-01 12:28:14 -04:00
1 parent d315d72e93
commit 8bfdc1b8b2
8 files changed
+18 -13

No files matched your search

@@ -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,
@@ -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);
};
@@ -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,
@@ -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,
+3 -3
View File
@@ -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,
+2 -1
View File
@@ -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,
@@ -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,
+1 -1
View File
@@ -76,7 +76,7 @@ const handleCameraExit = () => {
};
onNet(PhotoEvents.SEND_PHOTOS, (photos: string[]) => {
sendCameraEvent('setPhotos', photos);
sendCameraEvent(PhotoEvents.SEND_PHOTOS, photos);
});
function takePhoto() {