useSetIframeBackbroundColor
This commit is contained in:
parent
f8660968de
commit
7841d84df3
|
@ -1,3 +1,4 @@
|
||||||
|
import { useEffect } from 'react'
|
||||||
import { Col } from 'web/components/layout/col'
|
import { Col } from 'web/components/layout/col'
|
||||||
import { Spacer } from 'web/components/layout/spacer'
|
import { Spacer } from 'web/components/layout/spacer'
|
||||||
import { Page } from 'web/components/page'
|
import { Page } from 'web/components/page'
|
||||||
|
@ -176,6 +177,8 @@ const governorMidterms: StateElectionMarket[] = [
|
||||||
]
|
]
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
|
useSetIframeBackbroundColor()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page className="">
|
<Page className="">
|
||||||
<Col className="items-center justify-center">
|
<Col className="items-center justify-center">
|
||||||
|
@ -232,4 +235,13 @@ const App = () => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const useSetIframeBackbroundColor = () => {
|
||||||
|
useEffect(() => {
|
||||||
|
if (window.location.host !== 'manifold.markets') return
|
||||||
|
for (let i = 0; i < self.frames.length; i++) {
|
||||||
|
self.frames[i].document.body.style.backgroundColor = '#f9fafb'
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
}
|
||||||
|
|
||||||
export default App
|
export default App
|
||||||
|
|
Loading…
Reference in New Issue
Block a user