Skip to content

Commit 89efc57

Browse files
committed
Fix local storage load
1 parent 322fda6 commit 89efc57

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

site/src/components/TerminalLink/TerminalLink.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ export const TerminalLink: FC<React.PropsWithChildren<TerminalLinkProps>> = ({
2828
userName = "me",
2929
workspaceName,
3030
}) => {
31-
const { proxy } = useProxy()
3231

33-
const href = `${proxy.preferredPathAppURL}/@${userName}/${workspaceName}${
34-
agentName ? `.${agentName}` : ""
35-
}/terminal`
32+
// Always use the primary for the terminal link. This is a relative link.
33+
const href = `/@${userName}/${workspaceName}${agentName ? `.${agentName}` : ""
34+
}/terminal`
3635

3736
return (
3837
<Link

site/src/contexts/ProxyContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ export const loadPreferredProxy = (): PreferredProxy | undefined => {
198198
if (str === undefined || str === null) {
199199
return undefined
200200
}
201-
const proxy = JSON.parse(str)
202-
if (proxy.id === undefined || proxy.id === null) {
201+
const proxy: PreferredProxy = JSON.parse(str)
202+
if (proxy.selectedRegion === undefined || proxy.selectedRegion === null) {
203203
return undefined
204204
}
205205
return proxy

0 commit comments

Comments
 (0)