Skip to content

Commit

Permalink
auto redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
supreme2580 committed Dec 18, 2024
1 parent 6d0c214 commit 42eba12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/tabs/worlds/WorldsCreationPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ const WorldsCreationPanel = (props) => {
submitStart,
submitEnd
);
// Redirect will happen in createWorldCall
return;
}

const host = '0x' + props.queryAddress;
let createWorldEndpoint = 'create-canvas-devnet';
const response = await fetchWrapper(createWorldEndpoint, {
Expand All @@ -251,8 +253,8 @@ const WorldsCreationPanel = (props) => {
});
if (response.result) {
console.log(response.result);
closePanel();
props.setActiveTab('Worlds');
// Redirect to the new world in devnet mode too
window.location.href = `/worlds/${worldSlug}`;
}
};

Expand Down

0 comments on commit 42eba12

Please sign in to comment.