Skip to content

Commit 8723ce9

Browse files
authored
Loading component links to open externally if desktop app (#7833)
1 parent 399dbaf commit 8723ce9

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/components/Loading.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
} from '@src/lang/std/engineConnection'
1717
import { SafeRenderer } from '@src/lib/markdown'
1818
import { engineCommandManager } from '@src/lib/singletons'
19+
import { openExternalBrowserIfDesktop } from '@src/lib/openWindow'
1920

2021
interface LoadingProps extends React.PropsWithChildren {
2122
isDummy?: boolean
@@ -33,6 +34,10 @@ const markedOptions: MarkedOptions = {
3334
escape,
3435
}
3536

37+
const statusUrl = 'https://status.zoo.dev'
38+
const diagnosingNetworkIssuesUrl =
39+
'https://community.zoo.dev/t/diagnosing-network-connection-issues/156'
40+
3641
// This exists here and not in engineConnection because we want some styling
3742
// available to us.
3843
export const CONNECTION_ERROR_CALL_TO_ACTION_TEXT: Record<
@@ -61,7 +66,10 @@ export const CONNECTION_ERROR_CALL_TO_ACTION_TEXT: Record<
6166
[ConnectionError.Outage]: (
6267
<>
6368
We seem to be experiencing an outage. Please visit{' '}
64-
<a href="https://status.zoo.dev">status.zoo.dev</a> for updates.
69+
<a href={statusUrl} onClick={openExternalBrowserIfDesktop(statusUrl)}>
70+
status.zoo.dev
71+
</a>{' '}
72+
for updates.
6573
</>
6674
),
6775
[ConnectionError.PeerConnectionRemoteDisconnected]:
@@ -236,7 +244,12 @@ const Loading = ({
236244
<div className="text-sm">
237245
If the issue persists, please visit the community support thread
238246
on{' '}
239-
<a href="https://community.zoo.dev/t/diagnosing-network-connection-issues/156">
247+
<a
248+
href={diagnosingNetworkIssuesUrl}
249+
onClick={openExternalBrowserIfDesktop(
250+
diagnosingNetworkIssuesUrl
251+
)}
252+
>
240253
diagnosing network connection issues
241254
</a>
242255
.

0 commit comments

Comments
 (0)