2022-04-16 13:30:25 +08:00
|
|
|
import './utils/initLog'
|
2022-04-17 12:46:06 +08:00
|
|
|
import './utils/theme'
|
2022-03-13 14:40:38 +08:00
|
|
|
import { StrictMode } from 'react'
|
2022-04-02 19:29:43 +08:00
|
|
|
import * as ReactDOMClient from 'react-dom/client'
|
2022-03-13 14:40:38 +08:00
|
|
|
import { BrowserRouter } from 'react-router-dom'
|
2022-03-27 15:21:48 +08:00
|
|
|
import * as Sentry from '@sentry/react'
|
|
|
|
import { BrowserTracing } from '@sentry/tracing'
|
2022-03-13 14:40:38 +08:00
|
|
|
import 'virtual:svg-icons-register'
|
2022-05-29 17:53:27 +08:00
|
|
|
import './styles/global.css'
|
|
|
|
import './styles/accentColor.css'
|
|
|
|
import App from './AppNew'
|
2022-03-29 16:52:53 +08:00
|
|
|
import pkg from '../../package.json'
|
2022-04-16 13:31:05 +08:00
|
|
|
import ReactGA from 'react-ga4'
|
2022-05-12 02:45:43 +08:00
|
|
|
import { ipcRenderer } from './ipcRenderer'
|
2022-05-29 17:53:27 +08:00
|
|
|
import { QueryClientProvider } from 'react-query'
|
|
|
|
import reactQueryClient from '@/web/utils/reactQueryClient'
|
2022-06-12 15:29:14 +08:00
|
|
|
import ReactDOM from 'react-dom'
|
2022-04-16 13:31:05 +08:00
|
|
|
|
|
|
|
ReactGA.initialize('G-KMJJCFZDKF')
|
2022-03-27 15:21:48 +08:00
|
|
|
|
|
|
|
Sentry.init({
|
|
|
|
dsn: 'https://7cc7879b42ba4bed9f66fb6752558475@o436528.ingest.sentry.io/6274630',
|
|
|
|
integrations: [new BrowserTracing()],
|
|
|
|
release: `yesplaymusic@${pkg.version}`,
|
2022-03-30 00:53:05 +08:00
|
|
|
environment: import.meta.env.MODE,
|
2022-03-27 15:21:48 +08:00
|
|
|
|
|
|
|
// Set tracesSampleRate to 1.0 to capture 100%
|
|
|
|
// of transactions for performance monitoring.
|
|
|
|
// We recommend adjusting this value in production
|
|
|
|
tracesSampleRate: 1.0,
|
|
|
|
})
|
2022-03-13 14:40:38 +08:00
|
|
|
|
2022-04-20 20:25:20 +08:00
|
|
|
ipcRenderer()
|
|
|
|
|
2022-04-02 19:29:43 +08:00
|
|
|
const container = document.getElementById('root') as HTMLElement
|
|
|
|
const root = ReactDOMClient.createRoot(container)
|
|
|
|
|
2022-06-12 15:29:14 +08:00
|
|
|
// root.render(
|
|
|
|
// <StrictMode>
|
|
|
|
// <BrowserRouter>
|
|
|
|
// <QueryClientProvider client={reactQueryClient}>
|
|
|
|
// <App />
|
|
|
|
// </QueryClientProvider>
|
|
|
|
// </BrowserRouter>
|
|
|
|
// </StrictMode>
|
|
|
|
// )
|
|
|
|
|
|
|
|
ReactDOM.render(
|
2022-03-13 14:40:38 +08:00
|
|
|
<StrictMode>
|
|
|
|
<BrowserRouter>
|
2022-05-29 17:53:27 +08:00
|
|
|
<QueryClientProvider client={reactQueryClient}>
|
|
|
|
<App />
|
|
|
|
</QueryClientProvider>
|
2022-03-13 14:40:38 +08:00
|
|
|
</BrowserRouter>
|
2022-06-12 15:29:14 +08:00
|
|
|
</StrictMode>,
|
|
|
|
document.getElementById('root')
|
2022-03-13 14:40:38 +08:00
|
|
|
)
|