File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ import { useTotalPricedBalance } from "../entities/wallets/data"
8
8
import { useDisplayUsd } from "../entities/wallets/page"
9
9
10
10
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
+
11
15
const userData = useUserContext ( ) . unwrap ( )
12
16
const background = useBackgroundContext ( ) . unwrap ( )
13
17
@@ -27,9 +31,14 @@ export function HomePage() {
27
31
useEffect ( ( ) => {
28
32
getPersisted ( )
29
33
34
+ if ( background . isExtension ( ) )
35
+ return
36
+ if ( navigator . userAgent . toLowerCase ( ) . includes ( "firefox" ) )
37
+ return
38
+
30
39
const t = setInterval ( getPersisted , 1000 )
31
40
return ( ) => clearTimeout ( t )
32
- } , [ getPersisted ] )
41
+ } , [ background , getPersisted ] )
33
42
34
43
const Body =
35
44
< PageBody >
@@ -52,7 +61,7 @@ export function HomePage() {
52
61
</ div >
53
62
< div className = "h-8" />
54
63
< div className = "grow" />
55
- { persisted === false && < >
64
+ { persisted === false && background . isWebsite ( ) && < >
56
65
< div className = "text-lg font-medium" >
57
66
Alerts
58
67
</ div >
@@ -67,7 +76,7 @@ export function HomePage() {
67
76
< div className = "h-2" />
68
77
</ div >
69
78
</ > }
70
- </ PageBody >
79
+ </ PageBody >
71
80
72
81
const Header =
73
82
< PageHeader title = "Home" />
You can’t perform that action at this time.
0 commit comments