mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Feat/inject debug - Use new abstraction to clean up debug data (#70)
* feat(phone/debug): Inject debug data for development * refactor(phone/debug): Refactored mock data to InjectDebugEvents * fix(phone/debug) removed useless debug injections
This commit is contained in:
11 files changed
+243
-256
No files matched your search
@@ -15,6 +15,60 @@ import { BankHome } from './home/BankHome';
|
||||
import { BankAccount } from './account/BankAccount';
|
||||
import { TransactionList } from './transactions/TransactionList';
|
||||
import { BankAlert } from './alert/BankAlert';
|
||||
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
||||
|
||||
InjectDebugData([
|
||||
{
|
||||
app: 'BANK',
|
||||
method: 'setCredentials',
|
||||
data: {
|
||||
name: 'Firstname Lastname',
|
||||
balance: 2000,
|
||||
},
|
||||
},
|
||||
{
|
||||
app: 'BANK',
|
||||
method: 'setTransaction',
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
amount: 200,
|
||||
type: 'Deposit',
|
||||
source: 'chip',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
amount: 200,
|
||||
type: 'Withdraw',
|
||||
source: 'chip',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
amount: 200,
|
||||
type: 'Withdraw',
|
||||
source: 'chip',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
amount: 50,
|
||||
type: 'Deposit',
|
||||
source: 'chip',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
amount: 50,
|
||||
type: 'Deposit',
|
||||
source: 'chip',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
amount: 50,
|
||||
type: 'Deposit',
|
||||
source: 'chip',
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
|
||||
@@ -4,6 +4,24 @@ import { AppContent } from '../../../ui/components/AppContent';
|
||||
import { usePhotoModal } from '../hooks/usePhotoModal';
|
||||
import { GalleryGrid } from './grid/GalleryGrid';
|
||||
import { GalleryModal } from './modal/GalleryModal';
|
||||
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
||||
|
||||
InjectDebugData([
|
||||
{
|
||||
app: 'CAMERA',
|
||||
method: 'setPhotos',
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
image: 'https://i.imgur.com/OO8wx6Z.jpg',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
image: 'https://i.imgur.com/pqGBiST.jpg',
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
const CameraApp = () => {
|
||||
const { modal } = usePhotoModal();
|
||||
|
||||
@@ -14,6 +14,26 @@ import { useContactDetail } from '../hooks/useContactDetail';
|
||||
import { ContactAlert } from './alert/ContactAlert';
|
||||
|
||||
import useStyles from './styles.contacts';
|
||||
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
||||
|
||||
InjectDebugData([
|
||||
{
|
||||
app: 'CONTACTS',
|
||||
method: 'setContacts',
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
display: 'Ruqen',
|
||||
number: '43534444',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
display: 'Taso',
|
||||
number: '456466',
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
export const ContactsApp = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
@@ -8,6 +8,26 @@ import { Switch, Route } from 'react-router-dom';
|
||||
import DialPage from './views/DialPage';
|
||||
import DialerNavBar from './DialerNavBar';
|
||||
import { useDialHistory } from '../hooks/useDialHistory';
|
||||
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
||||
|
||||
InjectDebugData([
|
||||
{
|
||||
app: 'DAILER',
|
||||
method: 'setHistory',
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
transmitter: '636-6496',
|
||||
start: 1612301545782,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
transmitter: '777-7777',
|
||||
start: 1612301545782,
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
export const DialerApp = () => {
|
||||
const history = useDialHistory();
|
||||
|
||||
@@ -14,6 +14,26 @@ import { useNoteModal } from './hooks/useNoteModal';
|
||||
import { useNoteDetail } from './hooks/useNoteDetail';
|
||||
|
||||
import useStyles from './notes.styles';
|
||||
import InjectDebugData from '../../os/debug/InjectDebugData';
|
||||
|
||||
InjectDebugData([
|
||||
{
|
||||
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',
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
export const NotesApp = () => {
|
||||
const { setNoteModal } = useNoteModal();
|
||||
|
||||
@@ -8,6 +8,32 @@ import { Switch, Route } from 'react-router-dom';
|
||||
|
||||
import './Sellout.css';
|
||||
import { ListingFormContainer } from './form/ListingFormContainer';
|
||||
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
||||
|
||||
InjectDebugData([
|
||||
{
|
||||
app: 'SELLOUT',
|
||||
method: 'setListings',
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
name: 'Some guy',
|
||||
number: '123-4567',
|
||||
title: 'Car',
|
||||
description: 'Selling this cool car',
|
||||
url: 'https://i.imgur.com/ROmGTwi.jpeg',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'Some other dude',
|
||||
number: '666-6666',
|
||||
title: 'Material',
|
||||
description: 'Selling my wife',
|
||||
url: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
export const SelloutApp = () => {
|
||||
return (
|
||||
|
||||
@@ -19,6 +19,7 @@ import './twitter.css';
|
||||
import 'emoji-mart/css/emoji-mart.css';
|
||||
import { useProfile } from '../hooks/useProfile';
|
||||
import ProfilePrompt from './profile/ProfilePrompt';
|
||||
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
backgroundModal: {
|
||||
|
||||
Reference in new issue
Block a user