Files
new-phone-who-dis/phone/src/index.tsx
T
Taso f1f6a05981 tweak(dialer): Several fixes and improvements
Time has been changed to a relative format. Locale specifics are pending
merge of #168.

Several typos have been fixed where "DAILER" was referenced instead of
"DIALER"

A translation key was added for when a user has no call history.

The input box has been unlocked so users can use their keyboard directly
rather than using the dial pad.
2021-03-17 10:26:52 -04:00

42 lines
1.4 KiB
TypeScript

import '@babel/polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { HashRouter } from 'react-router-dom';
import { RecoilRoot } from 'recoil';
import * as Sentry from '@sentry/react';
import { Integrations } from '@sentry/tracing';
import './main.css';
import PhoneConfig from './config/default.json';
import { PhoneContainer } from './PhoneContainer';
import attachMockNuiEvent from './os/debug/AttachMockNuiEvent';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import updateLocale from 'dayjs/plugin/updateLocale';
dayjs.extend(relativeTime);
dayjs.extend(updateLocale);
// Enable Sentry when config setting is true and when in prod
if (PhoneConfig.SentryErrorMetrics && process.env.NODE_ENV !== 'development') {
Sentry.init({
dsn: 'https://[email protected]/5581619',
autoSessionTracking: true,
integrations: [new Integrations.BrowserTracing()],
// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,
});
}
// window.mockNuiEvent is restricted to development env only
if (process.env.NODE_ENV === 'development') attachMockNuiEvent();
ReactDOM.render(
<HashRouter>
<RecoilRoot>
<PhoneContainer />
</RecoilRoot>
</HashRouter>,
document.getElementById('root'),
);