Skip to content

Commit a3a5b56

Browse files
committed
fix
1 parent 0e50088 commit a3a5b56

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/mods/foreground/home/page.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import { useTotalPricedBalance } from "../entities/wallets/data"
88
import { useDisplayUsd } from "../entities/wallets/page"
99

1010
export function HomePage() {
11+
const IS_CHROME_EXTENSION = location.protocol === "chrome-extension:"
12+
const IS_FIREFOX_EXTENSION = location.protocol === "moz-extension:"
13+
const IS_SAFARI_EXTENSION = location.protocol === "safari-web-extension:"
14+
1115
const userData = useUserContext().unwrap()
1216
const background = useBackgroundContext().unwrap()
1317

@@ -27,9 +31,14 @@ export function HomePage() {
2731
useEffect(() => {
2832
getPersisted()
2933

34+
if (background.isExtension())
35+
return
36+
if (navigator.userAgent.toLowerCase().includes("firefox"))
37+
return
38+
3039
const t = setInterval(getPersisted, 1000)
3140
return () => clearTimeout(t)
32-
}, [getPersisted])
41+
}, [background, getPersisted])
3342

3443
const Body =
3544
<PageBody>
@@ -52,7 +61,7 @@ export function HomePage() {
5261
</div>
5362
<div className="h-8" />
5463
<div className="grow" />
55-
{persisted === false && <>
64+
{persisted === false && background.isWebsite() && <>
5665
<div className="text-lg font-medium">
5766
Alerts
5867
</div>
@@ -67,7 +76,7 @@ export function HomePage() {
6776
<div className="h-2" />
6877
</div>
6978
</>}
70-
</PageBody>
79+
</PageBody >
7180

7281
const Header =
7382
<PageHeader title="Home" />

0 commit comments

Comments
 (0)