Skip to content

Commit 42eba12

Browse files
committed
auto redirect
1 parent 6d0c214 commit 42eba12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frontend/src/tabs/worlds/WorldsCreationPanel.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,10 @@ const WorldsCreationPanel = (props) => {
230230
submitStart,
231231
submitEnd
232232
);
233+
// Redirect will happen in createWorldCall
233234
return;
234235
}
236+
235237
const host = '0x' + props.queryAddress;
236238
let createWorldEndpoint = 'create-canvas-devnet';
237239
const response = await fetchWrapper(createWorldEndpoint, {
@@ -251,8 +253,8 @@ const WorldsCreationPanel = (props) => {
251253
});
252254
if (response.result) {
253255
console.log(response.result);
254-
closePanel();
255-
props.setActiveTab('Worlds');
256+
// Redirect to the new world in devnet mode too
257+
window.location.href = `/worlds/${worldSlug}`;
256258
}
257259
};
258260

0 commit comments

Comments
 (0)