mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
59 lines
1.7 KiB
TypeScript
59 lines
1.7 KiB
TypeScript
import React from 'react';
|
|
import { AppWrapper } from '../../../ui/components';
|
|
import { AppTitle } from '../../../ui/components/AppTitle';
|
|
import { AppContent } from '../../../ui/components/AppContent';
|
|
import { DialerHistory } from './views/DialerHistory';
|
|
import { useApp } from '../../../os/apps/hooks/useApps';
|
|
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';
|
|
import { ContactList } from '../../contacts/components/List/ContactList';
|
|
import { DialerThemeProvider } from '../providers/DialerThemeProvider';
|
|
import { CallEvents } from '../../../../../typings/call';
|
|
|
|
export const DialerApp = () => {
|
|
const history = useDialHistory();
|
|
|
|
const dialer = useApp('DIALER');
|
|
return (
|
|
<DialerThemeProvider>
|
|
<AppWrapper>
|
|
<AppTitle app={dialer} />
|
|
<AppContent>
|
|
<Switch>
|
|
<Route path="/phone/dial">
|
|
<DialPage />
|
|
</Route>
|
|
<Route exact path="/phone">
|
|
<DialerHistory calls={history} />
|
|
</Route>
|
|
<Route path="/phone/contacts" component={ContactList} />
|
|
</Switch>
|
|
</AppContent>
|
|
<DialerNavBar />
|
|
</AppWrapper>
|
|
</DialerThemeProvider>
|
|
);
|
|
};
|
|
|
|
InjectDebugData([
|
|
{
|
|
app: 'DIALER',
|
|
method: CallEvents.SET_CALL_HISTORY,
|
|
data: [
|
|
{
|
|
id: 1,
|
|
transmitter: '636-6496',
|
|
start: 1615946292,
|
|
},
|
|
{
|
|
id: 2,
|
|
transmitter: '777-7777',
|
|
start: 1615946292,
|
|
},
|
|
],
|
|
},
|
|
]);
|