Skip to content

Commit b37bedf

Browse files
committed
remove altUrl
1 parent d062549 commit b37bedf

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/commands/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ const EXTENSION_ID = "source-academy";
1212
*/
1313
const commands = (context: vscode.ExtensionContext) => ({
1414
pick: () => runLanguagePicker(context),
15-
"show-panel": (route?: string, altUrl?: string) =>
16-
showPanel(context, route, altUrl),
15+
"show-panel": (route?: string) => showPanel(context, route),
1716
"eval-editor": () => evalEditor(context),
1817
navigate: (route: string) => navigate(context, route),
1918
});

src/commands/showPanel.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,7 @@ async function handleMessage(
109109

110110
export async function showPanel(
111111
context: vscode.ExtensionContext,
112-
/*
113-
route is relative to frontendUrl, while altUrl allows specifiying any arbitrary URL.
114-
TODO: across this repo, move any references to backendUrl to the frontend repo, then remove altUrl param
115-
*/
116112
route?: string,
117-
altUrl?: string,
118113
) {
119114
let language: string | undefined = context.workspaceState.get("language");
120115
if (!language) {
@@ -140,8 +135,8 @@ export async function showPanel(
140135
context.subscriptions,
141136
);
142137

143-
const iframeUrl =
144-
altUrl ?? new URL(route ?? "/playground", config.frontendBaseUrl).href;
138+
const iframeUrl = new URL(route ?? "/playground", config.frontendBaseUrl)
139+
.href;
145140

146141
// equivalent to panel.webview.html = ...
147142
setWebviewContent(

0 commit comments

Comments
 (0)