pull/5370/head
yann300 11 months ago
parent 2a0e6f295a
commit e1fdaf94a7
  1. 11
      apps/remix-ide/src/app/components/preload.tsx
  2. 14
      apps/remix-ide/src/index.tsx
  3. 1
      libs/remix-ui/run-tab/src/lib/components/value.tsx

@ -1,6 +1,6 @@
import {RemixApp} from '@remix-ui/app'
import React, {useEffect, useRef, useState} from 'react'
import {render} from 'react-dom'
import { createRoot } from 'react-dom/client'
import * as packageJson from '../../../../../package.json'
import {fileSystem, fileSystems} from '../files/fileSystem'
import {indexedDBFileSystem} from '../files/filesystems/indexedDB'
@ -10,7 +10,7 @@ import './styles/preload.css'
import isElectron from 'is-electron'
const _paq = (window._paq = window._paq || [])
export const Preload = () => {
export const Preload = (props: any) => {
const [supported, setSupported] = useState<boolean>(true)
const [error, setError] = useState<boolean>(false)
const [showDownloader, setShowDownloader] = useState<boolean>(false)
@ -33,12 +33,7 @@ export const Preload = () => {
.then((AppComponent) => {
const appComponent = new AppComponent.default()
appComponent.run().then(() => {
render(
<>
<RemixApp app={appComponent} />
</>,
document.getElementById('root')
)
props.root.render(<RemixApp app={appComponent} />)
})
})
.catch((err) => {

@ -1,6 +1,5 @@
// eslint-disable-next-line no-use-before-define
import React from 'react'
import {render} from 'react-dom'
import './index.css'
import {ThemeModule} from './app/tabs/theme-module'
import {Preload} from './app/components/preload'
@ -8,6 +7,7 @@ import Config from './config'
import {Registry} from '@remix-project/remix-lib'
import {Storage} from '@remix-project/remix-lib'
import { createRoot } from 'react-dom/client'
;(async function () {
try {
@ -18,11 +18,9 @@ import {Storage} from '@remix-project/remix-lib'
const theme = new ThemeModule()
theme.initTheme()
render(
<React.StrictMode>
<Preload></Preload>
</React.StrictMode>,
document.getElementById('root')
)
const container = document.getElementById('root');
const root = createRoot(container)
if (container) {
root.render(<Preload root={root} />);
}
})()

@ -15,7 +15,6 @@ export function ValueUI(props: ValueProps) {
},[props.sendValue])
const validateValue = (e) => {
console.log('validateValue', e.target.value)
const value = e.target.value
if (!value) {

Loading…
Cancel
Save