mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
chore: render in the react 18 way
This commit is contained in:
parent
dd3f611db8
commit
8cb16fff6c
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Gitako } from 'components/Gitako'
|
||||
import { platform } from 'platforms'
|
||||
import * as React from 'react'
|
||||
import * as ReactDOM from 'react-dom'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import './content.scss'
|
||||
|
||||
if (platform.resolvePartialMetaData()) {
|
||||
|
|
@ -16,7 +16,7 @@ async function init() {
|
|||
await injectStyles(browser.runtime.getURL('content.css'))
|
||||
const SideBarElement = document.createElement('div')
|
||||
document.body.appendChild(SideBarElement)
|
||||
ReactDOM.render(<Gitako />, SideBarElement)
|
||||
createRoot(SideBarElement).render(<Gitako />)
|
||||
}
|
||||
|
||||
// injects a copy of stylesheets so that other extensions(e.g. dark reader) could read
|
||||
|
|
|
|||
Loading…
Reference in a new issue