fix(calls): fix references to async selector DialerHistory

This commit is contained in:
Taso committed 2021-07-28 14:26:01 -04:00
1 parent 36d1e993bd
commit 10c5e97088
15 files changed
+61 -67

No files matched your search

+1 -22
View File
@@ -21,8 +21,6 @@ const LoadingSpinner: React.FC = () => (
);
export const DialerApp = () => {
const history = useDialHistory();
const dialer = useApp('DIALER');
return (
<DialerThemeProvider>
@@ -35,7 +33,7 @@ export const DialerApp = () => {
</Route>
<Route exact path="/phone">
<React.Suspense fallback={<LoadingSpinner />}>
<DialerHistory calls={history} />
<DialerHistory />
</React.Suspense>
</Route>
<Route path="/phone/contacts" component={ContactList} />
@@ -46,22 +44,3 @@ export const DialerApp = () => {
</DialerThemeProvider>
);
};
InjectDebugData([
{
app: 'DIALER',
method: CallEvents.SET_CALL_HISTORY,
data: [
{
id: 1,
transmitter: '636-6496',
start: 1615946292,
},
{
id: 2,
transmitter: '777-7777',
start: 1615946292,
},
],
},
]);
@@ -16,6 +16,7 @@ import { fetchNui } from '../../../../utils/fetchNui';
import { ServerPromiseResp } from '../../../../../../typings/common';
import { useSnackbar } from '../../../../ui/hooks/useSnackbar';
import { useMyPhoneNumber } from '../../../../os/simcard/hooks/useMyPhoneNumber';
import { useDialHistory } from '../../hooks/useDialHistory';
const useStyles = makeStyles((theme: Theme) => ({
callForward: {
@@ -26,10 +27,11 @@ const useStyles = makeStyles((theme: Theme) => ({
},
}));
export const DialerHistory = ({ calls }) => {
export const DialerHistory: React.FC = () => {
const { addAlert } = useSnackbar();
const myNumber = useMyPhoneNumber();
const { getDisplayByNumber } = useContactActions();
const calls = useDialHistory();
const classes = useStyles();