1
- import { CopyIcon , EyeIcon } from "lucide-react" ;
1
+ import { Check , CopyIcon , EyeIcon } from "lucide-react" ;
2
2
import { useEffect , useState } from "react" ;
3
3
import { Link , Navigate , useLocation , useNavigate } from "react-router-dom" ;
4
4
@@ -8,6 +8,7 @@ import { IsolatedAppTopupDialog } from "src/components/IsolatedAppTopupDialog";
8
8
import Loading from "src/components/Loading" ;
9
9
import QRCode from "src/components/QRCode" ;
10
10
import { SuggestedApp , suggestedApps } from "src/components/SuggestedAppData" ;
11
+ import { Badge } from "src/components/ui/badge" ;
11
12
import { Button } from "src/components/ui/button" ;
12
13
import {
13
14
Card ,
@@ -170,17 +171,26 @@ export function ConnectAppCard({
170
171
< CardTitle className = "text-center" > Connection Secret</ CardTitle >
171
172
</ CardHeader >
172
173
< CardContent className = "flex flex-col items-center gap-5" >
173
- < div className = "flex flex-row items-center gap-2 text-sm" >
174
- < Loading className = "w-4 h-4" />
175
- < p > Waiting for app to connect</ p >
176
- </ div >
177
- { timeout && (
178
- < div className = "text-sm flex flex-col gap-2 items-center text-center" >
179
- Connecting is taking longer than usual.
180
- < Link to = { `/apps/${ app ?. appPubkey } ` } >
181
- < Button variant = "secondary" > Continue anyway</ Button >
182
- </ Link >
183
- </ div >
174
+ { ! app . lastEventAt ? (
175
+ < >
176
+ < div className = "flex flex-row items-center gap-2 text-sm" >
177
+ < Loading className = "w-4 h-4" />
178
+ < p > Waiting for app to connect</ p >
179
+ </ div >
180
+ { timeout && (
181
+ < div className = "text-sm flex flex-col gap-2 items-center text-center" >
182
+ Connecting is taking longer than usual.
183
+ < Link to = { `/apps/${ app ?. appPubkey } ` } >
184
+ < Button variant = "secondary" > Continue anyway</ Button >
185
+ </ Link >
186
+ </ div >
187
+ ) }
188
+ </ >
189
+ ) : (
190
+ < Badge variant = "positive" >
191
+ < Check className = "w-4 h-4 mr-2" />
192
+ < p > App connected</ p >
193
+ </ Badge >
184
194
) }
185
195
< a href = { pairingUri } target = "_blank" className = "relative" >
186
196
< div className = { ! isQRCodeVisible ? "blur-md" : "" } >
0 commit comments