-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathmain.tsx
33 lines (27 loc) · 827 Bytes
/
main.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { isEmojiSupported } from 'is-emoji-supported';
import React from 'react';
import { createRoot } from 'react-dom/client';
import './style.css';
import App from './App';
import ErrorBoundary from './ErrorBoundary';
(function polyfillCountryFlagEmojis() {
if (!isEmojiSupported('😊') || isEmojiSupported('🇨🇭')) {
return;
}
const style = document.createElement('style');
style.innerHTML = `
body, html {
font-family: 'Twemoji Country Flags', Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
}
`;
document.head.appendChild(style);
})();
const container = document.getElementById('root');
const root = createRoot(container!);
root.render(
<React.StrictMode>
<ErrorBoundary>
<App />
</ErrorBoundary>
</React.StrictMode>,
);