chore: ReactDOM <- react-dom/client

This commit is contained in:
CrescentLeaf
2025-09-07 13:00:45 +08:00
parent c752f13d22
commit 5b5845db14

View File

@@ -4,7 +4,7 @@ import { $ } from "mdui/jq"
import { breakpoint, Dialog } from "mdui" import { breakpoint, Dialog } from "mdui"
import * as React from 'react' import * as React from 'react'
import { createRoot } from 'react-dom/client' import ReactDOM from 'react-dom/client'
// deno-lint-ignore no-window no-window-prefix // deno-lint-ignore no-window no-window-prefix
new URL(location.href).searchParams.get('debug') == 'true' && window.addEventListener('error', ({ message, filename, lineno, colno, error }) => { new URL(location.href).searchParams.get('debug') == 'true' && window.addEventListener('error', ({ message, filename, lineno, colno, error }) => {
@@ -17,7 +17,7 @@ new URL(location.href).searchParams.get('debug') == 'true' && window.addEventLis
import App from './ui/App.tsx' import App from './ui/App.tsx'
createRoot(document.getElementById('app') as HTMLElement).render(React.createElement(App, null)) ReactDOM.createRoot(document.getElementById('app') as HTMLElement).render(React.createElement(App, null))
const onResize = () => { const onResize = () => {
document.body.style.setProperty('--whitesilk-widget-message-maxwidth', breakpoint().down('md') ? "80%" : "70%") document.body.style.setProperty('--whitesilk-widget-message-maxwidth', breakpoint().down('md') ? "80%" : "70%")