Skip to content

Commit

Permalink
refactor: remove hash router (#6141)
Browse files Browse the repository at this point in the history
  • Loading branch information
guanbinrui authored Apr 24, 2022
1 parent b3c4d01 commit eae6d34
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { memo } from 'react'
import { HashRouter } from 'react-router-dom'
import { makeStyles } from '@masknet/theme'
import { PageInspector, PageInspectorProps } from '../../../components/InjectedComponents/PageInspector'
import { createReactRootShadowed } from '../../../utils/shadow-root/renderInShadowRoot'
Expand All @@ -20,10 +19,6 @@ export function injectPageInspectorDefault<T extends string>(
return function injectPageInspector(signal: AbortSignal) {
const dom = document.body.appendChild(document.createElement('div')).attachShadow({ mode: 'closed' })

createReactRootShadowed(dom, { signal, key: 'page-inspector' }).render(
<HashRouter>
<PageInspectorDefault />
</HashRouter>,
)
createReactRootShadowed(dom, { signal, key: 'page-inspector' }).render(<PageInspectorDefault />)
}
}

0 comments on commit eae6d34

Please sign in to comment.