Skip to content

Commit

Permalink
Refactor E2EPage
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Apr 25, 2023
1 parent 7aa5977 commit a224491
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/app/pages/E2EPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ import { useNavigate } from 'react-router-dom'
import * as monitor from 'vendors/monitor'
import * as oasisscan from 'vendors/oasisscan'

export function E2EPage() {
return (
<div>
<TestVendors></TestVendors>
<TestUnsafeInputs></TestUnsafeInputs>
</div>
)
}

interface e2eWindow extends Window {
monitor: any
oasisscan: any
}
declare const window: e2eWindow

export function E2EPage() {
const navigate = useNavigate()
const [showUnsafeInputs, setShowUnsafeInputs] = React.useState(false as false | 'firefox' | 'chrome')

function TestVendors() {
useEffect(() => {
window.monitor = monitor
window.oasisscan = oasisscan
Expand All @@ -27,6 +33,12 @@ export function E2EPage() {
window.oasisscan = undefined
}
}, [])
return <></>
}

function TestUnsafeInputs() {
const navigate = useNavigate()
const [showUnsafeInputs, setShowUnsafeInputs] = React.useState(false as false | 'firefox' | 'chrome')

return (
<div>
Expand Down

0 comments on commit a224491

Please sign in to comment.