There was an error while loading. Please reload this page.
1 parent d552642 commit 72f6168Copy full SHA for 72f6168
1 file changed
apps/web/src/pages/sandbox/Sandbox.tsx
@@ -131,7 +131,17 @@ function New() {
131
132
const response = await exposeVscode(data!.sandbox!.id!);
133
if (response.data?.previewUrl) {
134
- window.open(response.data.previewUrl, "_blank");
+ const url = new URL(response.data.previewUrl);
135
+ if (
136
+ data.sandbox?.repo &&
137
+ data.sandbox.provider === "cloudflare"
138
+ ) {
139
+ url.searchParams.set(
140
+ "folder",
141
+ `/workspace/${data.sandbox.repo.split("/").pop()!}`,
142
+ );
143
+ }
144
+ window.open(url, "_blank");
145
}
146
}}
147
>
0 commit comments