mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 11:42:19 +08:00
disable annoying warnings
This commit is contained in:
parent
e68411a020
commit
713530cae3
|
@ -3,9 +3,9 @@ import ReactDOM from 'react-dom/client'
|
|||
import { BrowserRouter } from 'react-router-dom'
|
||||
import { ThemeProvider as NextThemesProvider } from 'next-themes'
|
||||
import { NextUIProvider } from '@nextui-org/react'
|
||||
|
||||
import App from './App'
|
||||
import './assets/main.css'
|
||||
import '@renderer/utils/init'
|
||||
import '@renderer/assets/main.css'
|
||||
import App from '@renderer/App'
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
|
|
15
src/renderer/src/utils/init.ts
Normal file
15
src/renderer/src/utils/init.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
const originError = console.error
|
||||
const originWarn = console.warn
|
||||
console.error = function (...args: any[]): void {
|
||||
if (typeof args[0] === 'string' && args[0].includes('validateDOMNesting')) {
|
||||
return
|
||||
}
|
||||
originError.call(console, args)
|
||||
}
|
||||
console.warn = function (...args): void {
|
||||
if (typeof args[0] === 'string' && args[0].includes('aria-label')) {
|
||||
return
|
||||
}
|
||||
originWarn.call(console, args)
|
||||
}
|
Loading…
Reference in New Issue
Block a user